Script to send notification when process finishes
Hey all. So, the goal here is to know when tape backup jobs are idle (nothing being backed up). The process name I'm interested in is called nvjobmgr. They only exist (as far as I can tell, anyway) when jobs are active. Then they disappear when idle. I'm trying to determine how long Netvault is idle before the next set of jobs kick off. This metric, hopefully, should help determine whether we need to purchase additional drives, how much more/less data it's backing up, etc.
The initial thought was to somehow "daemonize" the script to constantly monitor PID names for process name "nvjobmjr", write a statement with date/time stamp when jobs start into a file (perhaps /var/log/netvault/nvactive.txt), then create a different file (/var/log/netvault/nvidle.txt) when jobs finish.
If anyone has done something similar, might you be willing to share your code please?
|