Skip to main content

Hi-

What's the best way to have a machine report its DAT anti-virus level? We use McAfee VirusScan 8.6.1, which stores its dats in /usr/local/vscanx/dats All I really need is an "ls" on that folder as the folders contained within "dats" are the dat levels, e.g. "5443" for the most recent. The resource kit has a nice script, but it's for Virex. VirusScan doesn't have the uvscan command that the script references (or at least not that I'm aware of)

Anyway...

At my old job I used Apple Remote Desktop and could just display the results of an LS command on my admin workstation. How do I get something similar with Casper?

I was thinking that I'd have a script do an LS on /usr/local/vscanx/dats and pipe that to a file that used a query to networksetup to name it the name of the computer. Then, I'd copy it to my CasperShare. Wrong way about it?

Thanks!!!

j
--
Jared Nichols
ISD Infrastructure and Operations - Desktop Engineering
MIT Lincoln Laboratory
244 Wood St.
Lexington, MA 02420-9108
(781) 981-5500

I like it - always multiple ways to skin the cat. I'll test and will incorporate it if it works as expected.


Silly me. Why didn't I think of that! Best method of all. No grep required.
--
Walter Rowe, 301-975-2885
Supervisor, System Hosting Services
Enterprise Systems Division
NIST, US Dept of Commerce


After some little changes it does shorten it down, although I still had to grep out the awk statement itself as it always finds itself. On Sep 23, 2011, at 8:38 AM, Ness, Todd wrote:

entourageCheck=ps -ef | grep -v awk | awk '/Entourage.app/{print $2}'

vs

entourageCheck=ps -ax | grep -i "entourage" | grep -v "grep" | grep -v "/bin/sh ./entourageAlert" | awk '{print $1}'

Both seem to work fine. Thanks for the help all. Now to go and annoy some procrastinators.

if [ "$entourageCheck" != "" ]; then #Annoy people
fi
exit 0


You haven't mentioned how you are launching your script, but launchd may be a good overall option for what you are actually trying to achieve.

If the app launches post a message on screen.

Sean


Essentially what I am doing except I'm using a JSS script policy, the "every 15" trigger and "once a day" for now. Later next week, I'll remove the "once a day" limit which will should motivate people even more.

-Aaron


entourageCheck=ps -ef | awk '//Entourage.app//{print $2}'

This will only find "/Entourage.app/" which doesn't match the "awk" command. I just tested this against Terminal.app (my terminal window).

wrowe:~ walter$ ps -ef | awk '/Terminal.app/ { print $0 }' 502 16047 249 0 2:45PM ?? 0:01.43 /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_352342 502 16229 16050 0 2:47PM ttys000 0:00.00 awk /Terminal.app/ { print $0 }

wrowe:~ walter$ ps -ef | awk '//Terminal.app// { print $0 }' 502 16047 249 0 2:45PM ?? 0:01.82 /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_352342

wrowe:~ walter$ ps -ef | awk '//Terminal.app// { print $1 }'
502

wrowe:~ walter$

--
Walter Rowe, 301-975-2885
Supervisor, System Hosting Services
Enterprise Systems Division
NIST, US Dept of Commerce