Getting sar report for past one month


 
Thread Tools Search this Thread
Operating Systems Solaris Getting sar report for past one month
# 1  
Old 06-13-2019
Getting sar report for past one month

Please help with the command to generate SAR report (CPU and memory) for the past 30 days (in one command).
Is it possible?
Instead of using one line by one line like this :

Code:
sar -r -f /var/adm/sa/sa14


Last edited by vbe; 06-13-2019 at 06:55 AM..
# 2  
Old 06-13-2019
I do not think you can do it in one command. Try something like:

Code:
ls -tr /var/adm/sa/sa[0-9][0-9] | 
while read safile
do
  sar -r -f "$safile"
done > reportfile

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

SAR Report on Cores/ Threads Per Zone

I am trying to understand the CPU utilization on my server. its running Solaris 10 in an container (zone) the physical server has 1 cpu, 4 cores and 2 threads per core. the zone has been configured to use only 6 threads (3 cores) So when i run sar -u reports against the zone, i am seeing... (1 Reply)
Discussion started by: dshakey
1 Replies

2. Shell Programming and Scripting

Need last month files after 10th of every month

Hi, I need all file names in a folder which has date >= 10th of last month, Example : files in folder AUTO_F1_20140610.TXT BUTO_F1_20140616.TXT CUTO_F1_20140603.TXT FA_AUTO_06012014.TXT LA_AUTO_06112014.TXT MA_AUTO_06212014.TXT ZA_AUTO_06232014.TXT Output: AUTO_F1_20140610.TXT... (9 Replies)
Discussion started by: nani1984
9 Replies

3. Shell Programming and Scripting

How to add decimal month to some month in sql, php, perl, bash, sh?

Hello, i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m i need to write this script in php or bash or sh or mysql or perl in normal time o unix time i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
Discussion started by: bacarrdy
14 Replies

4. Shell Programming and Scripting

Convert From Month Number to Month Name

Hi, I have a script that accepts an input date from the user in yyyy-mm-dd format. I need to get the mm-dd part and convert it to month name. example: 2011-11-15 I want that to become "Nov 15" I don't have the GNU date, I am using an AIX os. Thanks. (1 Reply)
Discussion started by: erin00
1 Replies

5. Linux

How to calculate total CPU usage from SAR report?

Hi, I want to calculate the total cpu usage from the sar report. Say for example, Linux 2.6.24-21-generic (blade10) 09/10/2012 04:54:36 PM CPU %user %nice %system %iowait %steal %idle 04:54:37 PM all 0.00 0.00 0.00 0.00 ... (1 Reply)
Discussion started by: rohitmd
1 Replies

6. Shell Programming and Scripting

Script to counting a specific word in a logfile on each day of this month, last month etc

Hello All, I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer. Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies

7. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

8. Shell Programming and Scripting

sar report to xml converter

I use sar reports for getting the statistic. It is better for me to get these reports converted to xml. I use some scripts to convert them but it takes a long time. Do you know any public scripts to convert sar report to xml in 1 -2 kicks. (0 Replies)
Discussion started by: gogogo
0 Replies

9. UNIX for Dummies Questions & Answers

setting up cron job for month end week report

Hi all, Needs your help in scheduling a cron job for the below mentioned requirement. Just let me know if anybody has a similar job running as mentioned below: Month end reports - Report of all items created in a parent table that were created during the week. Presently this report runs... (3 Replies)
Discussion started by: Bhups
3 Replies
Login or Register to Ask a Question