Script to get file size on Windows Server

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Script to get file size on Windows Server

Post by mcutting »

I am currently in the process of porting my Cacti install from Windows to Ubuntu. I currently have a vbscript that collects the size of a file located on a share at a Windows box.

This data isi then presented to Cacti for graphing. However, as vbscript probably won't work on Linux, I guess I'll have to write something similar in bash.

Can anyone offer something relatively simple, or any pointers ? I'm no nix guru, so any help would be appreciated.

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Hmm - anyone ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
raupe
Posts: 11
Joined: Sun Feb 15, 2009 11:58 am

Post by raupe »

mcutting,

never seen anything like you asked, but the following links might point you in the right direction:

CIM_DataFile Class @ MSDN
Monitor Windows via WMI from Cacti on Linux
Linux to Windows WMI Plugin - Beta
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Raupe - thanks for the links. In the meantime, I've managed to write this in bash using smbclient.

Not very elegant, but it works just how I want it.

Regds
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
raupe
Posts: 11
Joined: Sun Feb 15, 2009 11:58 am

Post by raupe »

mcutting wrote:Raupe - thanks for the links. In the meantime, I've managed to write this in bash using smbclient.

Not very elegant, but it works just how I want it.

Regds
mcutting , as long as it does the job it's fine :) Would you mind sharing the script?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest