please recommend beat monitors for FreeBSD...

Hello to all.

I have a FreeBSD 7.0 server but running two very important tasks and I would like to know how to keep them monitorized.

Task A: storage processing:
I have a custom made script which rotates files from a remote server with rsync, then archive them to a smbfs mount, then delete files older than 30 days in the remote server.

How can I make sure that the smbfs mount is mounted before delete files at the remote server?

Task B: FTP server:
- the FreeBSD server must receive 24/7 files from a media storage server (ftp client), so I would like to have a monitor that tells me if for some reason my server stop receiving those FTP files.

Any help will be appreciated =)

Thanks !

Aldo.
 
I am also thinking in something like

Code:
mount -p | grep buffalo
//CDR@BACKUP/CDR	/mnt/buffalo		smbfs	rw		0 0

But how could integrate this command/output in to my script logic? I mean how can I tell my script to check this output, and if it actually see the buffalo output it can proceed with file rotation and deletion...

thanks in advance.
 
Use $ echo $? right after $ mount -p | grep buffalo. If you successfully grep something, the output will be 0. If nothing is grepped, it is something other than 0. Just use an "if" in your shell script.
 
If you run some services and you want to make sure they keep running have a look at sysutils/daemontools. Daemontools will automatically restart any service should it crash.
 
Back
Top