LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (http://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   sar command (http://www.linuxquestions.org/questions/solaris-opensolaris-20/sar-command-661748/)

maooah 08-10-2008 06:31 AM

sar command
 
hi all

iam on Sun solaris 9 when i try to execute sar command i get the below error messages any help in this regards


$sar
sar: can't open /var/adm/sa/sa10
No such file or directory

Regards
Jaweed

stress_junkie 08-10-2008 07:25 AM

You probably don't have privileges to read or create the directory. Try running sar as root.

jlliagre 08-10-2008 08:22 AM

Actually, you need to enable the sar service and allow it to collect before data before displaying them with the sar command.

Use
Code:

# svcadm enable sar

maooah 08-10-2008 08:45 AM

hi stress and jlliagre

stress: i tried with root user then also i face the same error message

jlliagre: as you said enable this service , is there performance effect if we enable this service


thanks for your cooperation

Regards

jlliagre 08-10-2008 09:12 AM

Enabling sar has no noticeable performance impact.

stress_junkie 08-10-2008 11:20 AM

Quote:

Originally Posted by jlliagre (Post 3242546)
Actually, you need to enable the sar service and allow it to collect before data before displaying them with the sar command.

You can run sar interactively against the running system. If you do that it acts like vmstat and iostat combined. Or you can use sar interactively to interpret sar data files that were collected by a sar daemon.

jlliagre 08-10-2008 09:02 PM

That is indeed an alternate option.

maooah 08-11-2008 02:05 AM

hi stress and jlliagre

thanks for your replies

@root $svcadm enable sar
ksh: svcadm: not found

Iam on solaris platform

could you provide solution for the above

Regards

jlliagre 08-11-2008 02:37 AM

You PATH is missing /usr/sbin, which it shouldn't as you are root.
A simple workaround is specifying the full command path:
Code:

/usr/sbin/svcadm enable sar

maooah 08-11-2008 04:00 AM

hi

this is error message for the above command
root $/usr/sbin/svcadm enable sar
ksh: /usr/sbin/svcadm: not found

any other input

Regards

jlliagre 08-11-2008 04:46 AM

Oops, my mistake. I thought you were using Solaris 10.

Have a look at Solaris 9 documentation for enabling sar data collection.

http://docs.sun.com/app/docs/doc/806...d68pq3t?a=view

maooah 08-12-2008 02:27 AM

Hi all

could anyone explain me this command output

root $sar -r 5 5

SunOS 5.9 Generic_118558-05 sun4us 08/12/2008

10:14:09 freemem freeswap
10:14:14 908554 46089948
10:14:19 911888 46268448
10:14:24 913661 46363924
10:14:29 910352 46190254
10:14:34 913996 46375374

Average 911685 46257338


Regards

maooah 08-12-2008 03:03 AM

Hi all

could anyone explain me this command output

root $sar -r 5 5

SunOS 5.9 Generic_118558-05 sun4us 08/12/2008

10:14:09 freemem freeswap
10:14:14 908554 46089948
10:14:19 911888 46268448
10:14:24 913661 46363924
10:14:29 910352 46190254
10:14:34 913996 46375374

Average 911685 46257338


Regards

crisostomo_enrico 08-12-2008 03:30 AM

Check the docs (man page) or the Advanced administration guide:
Quote:

sar -r reports the number of memory pages and swap-file disk blocks that are currently unused.
freemem The average number of memory pages that are available to user processes over the intervals sampled by the command. Page size is machine-dependent.
freeswap The number of 512-byte disk blocks that are available for page swapping.
Hope this helps,
Enrico

maooah 08-12-2008 03:53 AM

hi

i would like to know what is the column
freemem it means physical memory and the values which are displaying it is in bytes or kbytes.
i check documents i couldnot able to follow up
Regards


All times are GMT -5. The time now is 04:42 PM.