question

Garry Cook GWCook at mactec.com
Thu Dec 12 20:53:14 CET 2002


Actually, you might want to change 'dir' to 'dir -l' in the command
below. When you pipe the output of 'dir' through 'wc -l', it will count
newlines. I believe that 'dir' without the '-l' flag will display all of
the files on a single line if possible, otherwise it will show as many
files as it can fit on a line before wrapping to the next line. 
'ls -l' should also work in place of 'dir'.

Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 303.881.5157 (Mobile) 

-----Original Message-----
From: Mike McClure [mailto:mmcclure at pneservices.com] 
Sent: Thursday, December 12, 2002 12:35 PM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] question


How about this for a start?

smbclient '\\server\share' <password> -U username -c 'cd directory; dir'
| wc -l


-- 
Mike McClure, CCIE # 5125, CISSP # 30232
PNE Services, Inc. -  http://www.pneservices.com


> Jeremy,
>
> actually it's a long story but it's a home grown smtp server for use 
> over satellite connections.  Our company provides email services with 
> a proprietary software over sat.  Right now we have our support people

> watching the servers 24/7 for problems.  On of the key indicators they

> watch is the mail queue.  If I had a plugin to alert them when the 
> number of messages that are queued gets too high, then they could get 
> more sleep.
>
> the plugin actually just needs to monitor the number of files in a 
> directory.  This might also be good for seeing when log files pile up 
> or anything of that nature.
>
> In my particular situation, the files are stored in a samba share on a

> linux box until the smtp server makes a connection and then retrieves 
> them.
>





-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/




More information about the Users mailing list