This discussion is archived
5 Replies Latest reply: Aug 1, 2013 1:29 AM by user9326981 RSS

What package to install to enable sar

user9326981 Newbie
Currently Being Moderated

Hi,

 

What package contains the sar commands? It is not installed now and I can't seem to find the name of the package containing its binaries.

 

Much appreciated.

 

Edmond

  • 1. Re: What package to install to enable sar
    cindys Pro
    Currently Being Moderated

    Hi Edmond,

     

    A simple name like sar is actually a detriment in a pkg search (pkg search -r *sar*) and there is probably a way to constrain a pkg search but I don't know how to do that. Its too much to sort through.

     

    A peak at the sar.1 man page tells me that it is system/accounting/legacy-accounting. You can always review the man pages on docs.oracle.com to

    find the pkg names but I can't guarantee that they're all listed.

     

    Thanks, Cindy

  • 2. Re: What package to install to enable sar
    GlynnFoster Newbie
    Currently Being Moderated

    One way you could do a more specific search would be to do the following:

     

    # pkg search '/usr/bin/sar'

     

    if you think the binary could be installed in /usr/bin (otherwise try another path location). You could filter the output to be only interested in package names by using:

     

    # pkg search -o pkg.name '/usr/bin/sar'

     

    Now, to see what type of file it's matching, we could use:

     

    # pkg search -o pkg.name,action.name,action.key '/usr/bin/sar'

    PKG.NAME                             ACTION.NAME        ACTION.KEY

    system/accounting/legacy-accounting  link               /usr/bin/sar

     

    So it tells me it's a link. Let's see where that links to:

     

    # pkg contents -r -a path=usr/bin/sar -o action.name,path,target system/accounting/legacy-accounting

    ACTION.NAME PATH             TARGET

    link        usr/bin/sar      ../sbin/sar

     

    In IPS, there's a few different ways to construct queries and searches through pkg contents and pkg search.

  • 3. Re: What package to install to enable sar
    user9326981 Newbie
    Currently Being Moderated

    Hi all,

     

    Thank you for your very helpful input. Exactly what I needed.

     

    Thanks again.

  • 4. Re: What package to install to enable sar
    NorbertB Newbie
    Currently Being Moderated

    Hi Edmond,

    Though the question is already answered (thread to be marked yet), here is a "Think simple" solution:

    Launch the Package Manager:

    (System --> Administration --> Package Manager) or call /usr/bin/packagemanager (as root).

    Type "sar" in the search field and search. Like me, you'll probably get a single entry.

     

    Norbert

  • 5. Re: What package to install to enable sar
    user9326981 Newbie
    Currently Being Moderated

    Hi,

     

    Thanks for the tip, but we're a zero GUI shop. Only command line.

     

    Thanks.

     

    Edmond

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points