/build/static/layout/Breadcrumb_cap_w.png

Is there a unix command to detect what version of KBOX agent is running?

Trying to determine what version is running so I can do an if/then statement in a bash script.


0 Comments   [ + ] Show comments

Answers (3)

Posted by: jknox 12 years ago
Red Belt
3

On a Mac, it would be something like:  ps aux | grep AMPAgent

Edit:  Ok, try this from your home directory:

/Library/Application\ Support/Dell/KACE/bin/AMPAgent -v |grep version

Or numerals only:

/Library/Application\ Support/Dell/KACE/bin/AMPAgent -v |grep version|awk '{print $6}'

Comments:
  • That pulls the process id and everything. Is there a way to pull the version from it? It shows its location which I could use. 5.3 stores KBOX in one location, 5.1 in another. I could just say if its here, do this, if its there, do that. - thefishyfew 12 years ago
  • Could you use something like:
    If Exist '5.3FolderName' Then
    'RunCommand'
    Else...."
    Or whatever the Unix equivalent would be. - Ben M 12 years ago
  • See above for edit. - jknox 12 years ago
    • That kinda did the trick. Here's the dilemma. Your solution works for 5.3 only. Version 5.1 has a different path: /Library/KBOXAgent/Home/bin/SMMPAgent. I will probably need to do an if statement and two variables to get it to work unless there's some common process that's running that I can grep the version from? - thefishyfew 12 years ago
      • I'd just update the agents to 5.3 so they are all the same. If you have uploaded the 5.3 agent to the KBOX, you can do the following:

        Settings>K1000 Agent>Agent Updates from KACE>

        Click Edit Mode and check the box for Enabled. - jknox 12 years ago
  • I'm probably asking a little too much from the bash scripting in detecting the different agents and then running a script based on the version. But I did find a way to detect the version:

    # First see if the file exists
    if [ -e "/Library/Application Support/Dell/KACE/data/version" ]; then
    #Then get the version from the file
    agent1=$(head -n 1 "/Library/Application Support/Dell/KACE/data/version")

    echo $agent1
    # else do this and see if agent is ver 5.1

    elif [ -e "/Library/KBOXAgent/Home/version" ]; then

    agent2=$(head -n 1 "/Library/KBOXAgent/Home/version")
    echo $agent2

    fi - thefishyfew 12 years ago
Posted by: AbhayR 12 years ago
Red Belt
2

IF you are talking about Redhat agent then try

------------

rpm -qa | grep amp

------------

Posted by: SMal.tmcc 12 years ago
Red Belt
-2

are you talking the client running on a machine or the kbox server's base OS?


Comments:
  • Based on his earlier question I would say he is talking about the machine client. - Ben M 12 years ago
  • she, but yes, machine client. sorry about not clarifying. - thefishyfew 12 years ago
  • Ah, my apologies. In the IT world I tend to assume that... Probably a bad habit. - Ben M 12 years ago
  • ;) - thefishyfew 12 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ