LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 08-10-2008, 06:31 AM   #1
maooah
Member
 
Registered: Dec 2007
Posts: 44

Rep: Reputation: 15
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
 
Old 08-10-2008, 07:25 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You probably don't have privileges to read or create the directory. Try running sar as root.
 
Old 08-10-2008, 08:22 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
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
 
Old 08-10-2008, 08:45 AM   #4
maooah
Member
 
Registered: Dec 2007
Posts: 44

Original Poster
Rep: Reputation: 15
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
 
Old 08-10-2008, 09:12 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Enabling sar has no noticeable performance impact.
 
Old 08-10-2008, 11:20 AM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by jlliagre View Post
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.
 
Old 08-10-2008, 09:02 PM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
That is indeed an alternate option.
 
Old 08-11-2008, 02:05 AM   #8
maooah
Member
 
Registered: Dec 2007
Posts: 44

Original Poster
Rep: Reputation: 15
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
 
Old 08-11-2008, 02:37 AM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
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
 
Old 08-11-2008, 04:00 AM   #10
maooah
Member
 
Registered: Dec 2007
Posts: 44

Original Poster
Rep: Reputation: 15
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
 
Old 08-11-2008, 04:46 AM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
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
 
Old 08-12-2008, 02:27 AM   #12
maooah
Member
 
Registered: Dec 2007
Posts: 44

Original Poster
Rep: Reputation: 15
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

Last edited by maooah; 08-12-2008 at 03:17 AM.
 
Old 08-12-2008, 03:03 AM   #13
maooah
Member
 
Registered: Dec 2007
Posts: 44

Original Poster
Rep: Reputation: 15
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
 
Old 08-12-2008, 03:30 AM   #14
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
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
 
Old 08-12-2008, 03:53 AM   #15
maooah
Member
 
Registered: Dec 2007
Posts: 44

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sar manoj.linux AIX 1 01-03-2008 07:52 AM
About sar satimis Linux - Software 2 06-14-2006 04:35 AM
sar command rsuks Linux - General 2 03-25-2006 03:53 AM
Sar sathish80 Linux - Newbie 1 01-16-2006 06:57 AM
monitoring I/O with sar command juanb Linux - Hardware 1 04-13-2005 11:43 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration