Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sa1(8) [osx man page]

sa1(8)							    BSD System Manager's Manual 						    sa1(8)

sa1 -- Generate a system activity daily data file. SYNOPSIS
/usr/lib/sa/sa1 [t n] DESCRIPTION
The sa1 command is a shell script used to invoke the system activity data collector, sadc. The binary sample data is collected at intervals t seconds apart, in a loop n times. The binary sample data is written to the standard daily data file, /var/log/sa/sadd where the dd repre- sents the current day of the month. sa1 is intended to be started by cron. EXAMPLE CRON ENTRY
# Starting at 8am collect system activity records # every 20 minutes for 12 hours # 20 minutes = 1200 seconds # 12 hours with 3 samples each hour = 36 loops 0 8 * * 1-5 /usr/lib/sa/sa1 1200 36 # After the 12 hour period, # collect a system activity report 30 20 * * 1-5 /usr/lib/sa/sa2 -A FILES
/var/log/sa/sadd Default daily activity file that holds the binary sampling data. dd are digits that represent the day of the month. SEE ALSO
crontab(1), fs_usage(1), netstat(1), sar(1), sc_usage(1), top(1), vm_stat(1), crontab(5), iostat(8), sa2(8), sadc(8) Mac OS X Jul 25 2003 Mac OS X

Check Out this Related Man Page

sadc(8) 						    BSD System Manager's Manual 						   sadc(8)

sadc -- system activity data collector SYNOPSIS
/usr/lib/sa/sadc [-m mode] [t n] [ofile] DESCRIPTION
The sadc tool is used to collect cumulative system activity data. The sample system data is collected at intervals t seconds apart, in a loop n times. The binary sample data is written to ofile if specified. Otherwise, the binary data is written to stdout. If the ofile file does not exist, it is created, otherwise it is truncated. sadc is intended to be used as the engine behind the sar(1) command, and is not typically invoked on the command line. Two shell scripts, sa1 and sa2, are provided to drive the typical sampling, saving, and reporting process. OPTIONS
The following options modify the way data is collected by sadc. -m mode Modify the collection of system statistics as specified by mode. Currently only one mode is supported. PPP By default, the collection of ppp network interface statistics is turned off. This is because the number of ppp connec- tions can be very high, causing the raw data file to grow unexpectedly large, especially when samples are collected at short intervals. Use the PPP mode to turn the collection back on. EXAMPLES
/usr/lib/sa/sadc 15 20 /tmp/sample.out This call collects 20 samples at 15 second intervals. The binary data is written to the /tmp/sample.out file FILES
/var/log/sa/sadd Default daily activity file that holds the binary sampling data. dd are digits that represent the day of the month. /usr/lib/sa/sa1 Shell script used to drive the sar data collection. /usr/lib/sa/sa2 Shell script used to drive the sar data reporting. SEE ALSO
fs_usage(1), netstat(1), sar(1), sc_usage(1), top(1), vm_stat(1), iostat(8), sa1(8), sa2(8) Mac OS X Jul 25 2003 Mac OS X
Man Page

14 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script doesn't get executed using crontab

I have the following crontab entry to run a shell script for every 30 minutes of every day: 30 * * * * $HOME/ > $HOME/main.log 2>$HOME/error.log after I created the crontab file I have also done: $crontab my_crontab I also check to make sure it exists, by using the following... (11 Replies)
Discussion started by: radhika
11 Replies

2. UNIX for Dummies Questions & Answers

Find and Create by Date

I have a log file that's generated on a daily basis, and saved with the Month and day at the end of it. For instance: file_type_Aug17.csv. As part of my excel conversion I need my script to search for the current Month and day(Aug17) and convert it. Thanks for your help! (14 Replies)
Discussion started by: ravzter
14 Replies

3. Shell Programming and Scripting

crontab entry to run every last day of the month

i've created a script which should run every last day of the month. what would be the exact crontab entry for this? thanks! (9 Replies)
Discussion started by: tads98
9 Replies

4. Shell Programming and Scripting

indication of find activity - bash script

Hi All, I wanted to show on stdout that a file was found right after it happens due to indicate the activity of long search. Further more I want to store the result of the find in a file. I have tried this: echo -n "Searching" find . -name Makefile -type f -print -exec echo -n "." \; >... (16 Replies)
Discussion started by: vercsab
16 Replies

5. Shell Programming and Scripting

How to extract log data based on date

Hi Gurus, I've been having some problem in extracting the log data based on the current date and month. As shown in the sample data below, how to extract the log info for Aug 11? Sample data: root pts/ta userpc Wed Aug 11 09:46 - 20:21 (10:35) root pts/ta userpc... (13 Replies)
Discussion started by: superHonda123
13 Replies

6. Shell Programming and Scripting

Transpose Daily Data from Column to Row.

Hi I'm looking to transpose Linux data from a daily report that logs every 10mins like below. After the first "comma" I need the daily total for Col2 and Col3 transposed like below. The new transposed format below will then be exported to Microsoft Excel for Reporting. Any help would be... (9 Replies)
Discussion started by: ravzter
9 Replies

7. Shell Programming and Scripting

Delete duplicate data and pertain the latest month data.

Hi I have a file with following records It contains three months of data, some data is duplicated,i need to access the latest data from the duplicate ones. for e.g; i have foll data "200","0","","11722","-63","","","","11722","JUL","09" "200","0","","11722","-63","","","","11722","JUL","09"... (10 Replies)
Discussion started by: vee_789
10 Replies

8. Shell Programming and Scripting

Checking variable with specific string and stripping number from it.

I am parsing a file and I get differnt results everytime. Sometimes I get 12s sometimes I get 54m and sometime 3h.. v1=12s or v1=54m or v1=3h 12s - 12 seconds 54m - 54 minutes 3h - 3 hour I have to write a script in such a way that it whenever v1 is in minutes, I should strip "m"... (14 Replies)
Discussion started by: jayeshpatel
14 Replies

9. Shell Programming and Scripting

Average for every day

Hi i have data like - Fieldseperator is "\t" -.. ... 05/18/12-23:40 12.0647 96.4762 140.746 19.4222 38.0837 17.1549 05/18/12-23:50 11.9463 97.7457 139.447 20.4776 29.8511 17.0144 05/19/12-00:00 11.6922 94.7384 130.364 18.5693 28.28 15.6425 05/19/12-00:10 10.8512 87.547 113.844... (11 Replies)
Discussion started by: IMPe
11 Replies

10. Shell Programming and Scripting

Another issue with crontab

My shell script #!/bin/sh ORACLE_HOME=/var/opt/oracle/product/10g; export ORACLE_HOME PATH=$PATH:$ORACLE_HOME/bin:/bin:/usr/bin; export PATH today=`date "+%m-%d-%Y %H:%M:%S"`; export today CUR_DIR=$1; export CUR_DIR LOG_FILE=$CUR_DIR/error.log; export LOG_FILE # Direct... (30 Replies)
Discussion started by: rafa_fed2
30 Replies

11. Shell Programming and Scripting

Collecting logs between two time stamps

Hi, please help me to collect the entire log files between two time stamp. for example, I am looking script to collect the entire log between "2015-03-27 15:59" to "2015-03-27 16:15" in the below sample log file. OS : RHEL 6.3 Date/Time : 24 hours format, the time is printing each log... (12 Replies)
Discussion started by: jerryknj
12 Replies

12. Shell Programming and Scripting

Completey new to scripting, question/help?

So I need to write a script that can parse our logs and give me the amount of daily activity per user on our website. Unfortunately I'm still learning the very basics so please bear with me :eek:. Below is an example snippet from a log to give you a basic idea of what each entry in the log... (21 Replies)
Discussion started by: xdawg
21 Replies

13. Shell Programming and Scripting

Parse log file to insert into database

I have a log file that's created daily by this command: sar -u 300 288 >> /var/log/usage/$(date "+%Y-%m-%d")_$(hostname)_cpu.log It that contains data like this: Linux 3.16.0-4-amd64 (myhostname) 08/15/2015 _x86_64_ (1 CPU) 11:34:17 PM CPU %user %nice ... (12 Replies)
Discussion started by: unplugme71
12 Replies

14. Shell Programming and Scripting

Grepping a timestamp range and assigning it to a constant

Hi, I couldn't find any thing on google about it and have been trying to figure this out but am not getting anywhere. I want to know if its possible through a script. I have a file with columns start time and end time separated by a comma, basically there are some other columns which I need to... (30 Replies)
Discussion started by: dsid
30 Replies