cancel
Showing results for 
Search instead for 
Did you mean: 

Run existing utility job with BEMCMD?

Mazama
Level 3

I work for a namaged service provider monitoring many customers' backups. Naturally, customers forget to insert tapes. In order to more efficiently issue reminders to customers, I hit upon the idea of runnig a scheduled inventory job, and having that job report to me by e-mail. Works great, I can prod only people whose drives report as empty without having to log on tot he customer server at all.

But it would be nice to be able to run these inventories on demand rather than just on a schedule. I have an agent-based tool that can launch shell scripts on the customers' (Windows) machines, so I figured I could just use BEMCMD to launch the pre-configured inventory job. The scheduled inventory job is set up to report its status to me by e-mail, including the job log which tells me what if any media is present in the drive. So I executed:

bemcmd -o1 -j"Daily drive inventory"

... and it didn't work. It could not find a job by that name. I checked to see if it was a case-sensitivity problem, but no. After using -v to see what happened it turned out that -o1 runs *backup* jobs but appears to not run *utility* jobs. Fine, makes sense, -o1 runs backup jobs and utility jobs are not backup jobs in the database. The right name is irrelevant because it's the wrong kind of job for -o1. So instead, I executed:

bemcmd -v -o117 -d"tandberg 1" -j"Daily drive inventory"

... and it didn't work either. This time, it was trying to create the job "daily drive inventory", which already exists. The same command without the -j<job name> option works fine, creating and running a new inventory job. Of course, *that* job doesn't notify me by e-mail, let alone include the necessary job log. Boo.

So I'm stumped. I don't see anywhere in the documentation a bemcmd option to *run* an existing utility job rather than *create* a new one. Is there an option to do this? (If not, where do I put in a feature request?)

Alternately, is there a bemcmd option to create a new inventory job with options set to report via smtp (with log) to a particular pre-configured recipient?

Thanks!
2 REPLIES 2

Ken_Putnam
Level 6
Is there an option to do this? (If not, where do I put in a feature request?)


Don't think there is.  You can request this from the "Ideas" section (top menu bar, far right)

You could gen up a cmd file that would execute the -117 job and save the output to a file (with the >> filename.ext  option) 

bemcmd -v -o117 -d"tandberg 1"   >>  inventory.txt 

(the ">>" replaces the file if it exists, ">" will create or append)

then use one of the shareware/freeware sendmail apps to mail that file to you

Mazama
Level 3
Yeah, I considered that. I would prefer not to add any more software than necessary to customer machines, though, so I'll probably just live with what I've got until/unless the suggestion becomes a feature. Thanks!

(Edit: Idea submitted. See: https://www-secure.symantec.com/connect/idea/add-bemcmd-option-run-existing-utility-job )