10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello All,
Was recently working on an requirement where we have to search files more than a specific number, following is the example on same.
Let's say file names are test_40000.txt,test_40001.txt and so on till test_99999.txt.
Now requirement was to search from find command only those... (1 Reply)
Discussion started by: RavinderSingh13
1 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I need your help. I am at a new place, just trying to understand what's going on here. When I do df -h, I see many mounts. But most of them are automount, how do I find the real location?
netappt1:/vol/homet2/sthan
1.7T 1.2T 527G 69% /home/sthan... (4 Replies)
Discussion started by: samnyc
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am currently trying to pin down a process NAME (could be a cron job or a tty) in Solaris. First I obtained a pid and then a ppid. I want to take the PPID and from there find the program/process that is making the VSH go high (cpu usage). I am currently trying to go up the chain using PS... (2 Replies)
Discussion started by: troystevens
2 Replies
4. Shell Programming and Scripting
Hi Guys,
I'd like to ask your advice on the following, I've written this script to terminate a given process by name:
#!/bin/bash
echo 'Please enter the process you wish to terminate'
read process
pid=$(pidof $process)
kill -9 $pid
echo $2
to make it safer I want it to reject the... (4 Replies)
Discussion started by: Lora Graham
4 Replies
5. Solaris
Hi All,
I have just started using SUN Solaris o.s version is :SunOS spdwa013(my server name) 5.8 Generic_117350-61 sun4u sparc SUNW,Sun-Fire-480R
My problem is that i have some processes running on that server they have a PID and a PPID.
But sometimes the PPID for a particular process... (2 Replies)
Discussion started by: usha rao
2 Replies
6. AIX
Hi
i am new to aix , we are using aix 5.3 version and model is 510 and 520 model servers. in our servers contains 8 gb ram.
but servers average ram usage is reaching 99.9% , can any body help on this , is any impact if memory usage reach 99.9%.
Regards
Balaji Poola (2 Replies)
Discussion started by: Balajipoola007
2 Replies
7. Solaris
hi
pmap, prstat and ps gives the RSS which is shared memory.
I need to know the consumption of real memory. how to do that?
thx (4 Replies)
Discussion started by: melanie_pfefer
4 Replies
8. UNIX for Dummies Questions & Answers
Is there any meaning on parent process id when it is equal = 1?
It is found that most of the ppid is lower than pid of the same process by 1
when perform ps -ef
but notice that some process's ppid is 1 (2 Replies)
Discussion started by: darkrainbow
2 Replies
9. AIX
We have 2 Rs6000 S-85
Each initially had/have 6 processors and 8 GIG of RAM each
Node 1 we added 14 processors and 32 GIG of RAM On May 19. (11 days ago)
My memory utilization reporting for node 1 showed a spike in available memory 25-30GB for May 19 to 25 . I kind of expected this because I... (5 Replies)
Discussion started by: Skyybugg
5 Replies
10. AIX
Hello AIX gurues...
In order to present the statistics of real memory usage I need to know how much real memory is used by the AIX 5L kernel. No the exact figures of course but some close to the reality.
The AIX is running in a 7GB real machine, it has a HACMP configuration and my concern is... (1 Reply)
Discussion started by: daniels
1 Replies
sa(8) System Manager's Manual sa(8)
NAME
sa - Summarizes accounting records
SYNOPSIS
sa [-abcdDfijkKlmnorstu] [-v Number] [-S SaveFile] [-U UserFile] [File] The sa command helps you manage the large volume of accounting
information that is generated each day when system accounting has been enabled by the system administrator or by the superuser.
FLAGS
Outputs all command names (including those containing unprintable characters and commands used only once) in the last column. In the
default format, such commands are summed and the total is written as the entry ***other. Sorts cpu output column 3 according to the sum of
user and system CPU time divided by the amount of CPU time required to execute the command entered in the last column (6) as many times as
is entered in the first column (1). Adds three percentage columns to the default format to list percentages as follows: Lists the percent-
age of the number of times each command was executed with respect to the total number of times all commands were executed (see 1a below).
Lists the percentage of the amount of real time required to execute each command the number of times entered in the first column with
respect to the total real time required to execute the total of all commands entered in the last column (see 2a below). Lists the percent-
age of the amount of command CPU time required to execute each command the number of times entered in the first column with respect to the
total CPU time required to execute the total of all commands entered in the last column (see 3a below). Sorts avio output column (4) in
descending order according to the average number of disk I/O operations. Substitutes tio column (4a) for the avio (4) column and sorts tio
output column 4a in descending order according to the total number of disk I/O operations. Used with the -v flag to inhibit interactive
threshold comparison of commands. Reads raw database file /var/adm/pacct only. Does not include records from summary database file
/var/adm/savacct. Outputs the average number of seconds per command in default columns 2, 3, and 4 instead of the total time in minutes
for the number of calls entered in column 1 for each command. Sorts and outputs records according to the value in the k output column 5 in
descending order. Substitutes k*sec column (5a) for the k (5) column and sorts the k*sec output column in descending order according to
the value of the memory time integral. Separates cpu column 3 into two columns. The new column entries are column 3a, which lists the s
(system) part of the CPU minutes, and column 3b, which lists the u (user) part of the CPU minutes. Outputs a 5-column file, which provides
the information in the following table. Listed below in left-to-right order are the column identification suffixes, or none when no suffix
is used, and the purpose of the column. Some columns are identical to the default output format described in the table in the DESCRIPTION
section; these are marked with *. Username or user ID as written in the /etc/passwd file. The total number of processes executed by the
user during the accounting period. Same as column 3 in the default output file. Same as column 4a in the default output file. Same as
column 5a in the default output file. Outputs the default format sorted in descending order according to the number of times each command
was called. Substitutes, in the default output format, the ratio of user CPU time (u) to system CPU time (s) as u/s in column 3 in place
of the total user and system CPU time (cpu) for the number of calls entered in the first column. The default format, described under
Description, is resorted in ascending order according to the values entered in column 3, cpu time. This sort is the reverse of the default
sort. Merges information in accounting database file /var/adm/pacct with summary files you specify with the -U and -S flags, or merges the
database file information with information in default files /var/adm/usracct or /var/adm/savacct. After the merge, database file
/var/adm/pacct is truncated. The use of this flag also implies the use of the -a flag. Uses SaveFile as the command summary file in place
of file /var/adm/savacct. Adds the re/cp column (3d) to the default format. Entries in this column express the ratio of real time to total
(cpu) time, which is the sum of user and system time for each command entered in the last column. Suspends all other flags and prints the
user numeric ID, the CPU time, memory usage, number of I/O operations, and the command name for each command. Uses UserFile as the user
summary file in place of file /var/adm/usracct to record per-user statistics output with the -m flag. Prints, as a query, the name of each
command used Number times or fewer to the standard output as follows: command-- where command-- is the name of the command written to the
standard output by sa.
When you respond by typing y to the standard input, the command record is omitted from a default-formatted list at the end of the interac-
tive command queries written to the standard output. The columnar values of the omitted record are totaled in an added record whose command
name is **junk** in the last column of that list. When you type any other character, the record for the queried command name remains in the
default output list at the end of the interactive commands written to the standard input.
DESCRIPTION
When you use the -s flag with the sa command, the information in /var/adm/pacct is condensed into summary file /var/adm/savacct, which con-
tains a count of the number of times each command was called and the amount of time system resources were used.
Condensed information for each user is stored in /var/adm/usracct. This condensed-information file conserves storage space because on a
large system the /var/adm/pacct daily process file can grow by as many as 100 blocks per day. Summary files are normally read before
accounting files are, so that files produced by sa include all available information.
When a filename is given as the last argument, the named file is treated as the process accounting file. The /var/adm/pacct file is the
default process accounting file.
When the sa command is invoked with no flags, the default output summary is an unheaded 6-column file consisting of, in some cases, infor-
mation having an identification suffix in the column. The identification suffix may be changed from the default (no flags specified) output
format by using various flags.
The following table lists the columns with left-to-right reference column numbers (not included in output) for the default format on the
left, the identification suffix for the entry when one is used (or none when one is not in the middle), and the purpose of the information
in that column on the right.
Columns having more than one identification suffix description (2 and 2a, for example) use the alternate suffix designation in the same sa
output printout column for each of the listed alternate entries for the column. For example, the second column has two possible suffix
designations: re and %. The re reference in the middle column describes the information in the second column of the output printed by the
sa command when this suffix is used. Correspondingly, the % reference describes the information in the sa output when the % suffix is used.
1 none The number of times the command entered in the last column
(6) was called.
1a % When the -c flag is used, sa adds this column after column 1
to list the number of times the command was called (entered
in column 1) as a percentage of the total number of times all
commands entered in the last column were called.
2 re The number of real-time (elapsed) minutes required to execute
the command entered in the last column (6) as many times as
is entered in the first column (1).
2a % When the -c flag is used, sa also adds this column after col-
umn 2 to list the amount of real time (entered in column 2)
required to process the command entered in the last column
(6) as many time as is entered in the first column (1), as a
percentage of the total amount of real time required to
process all of the commands listed in the last column.
3 cpu The number of CPU (user plus system) minutes used to execute
the command entered in the last column (6) as many times as
is entered in the first column (1).
3a u The number of user CPU minutes used.
3b s The number of system CPU minutes used.
3c u/s When the -o flag is used, substitutes u/s column (3c) for the
cpu (3) column and sorts the u/s output column in descending
order according to the ratio of user CPU time to system CPU
time.
3d % When the -c flag is used, sa also adds this column after col-
umn 3 to list the amount of CPU time (entered in column 3)
required to process the command, entered in the last column,
the number of times, entered in the first column, as a per-
centage of the total CPU time required to process all of the
commands listed in the last column.
3e re/cpu When the -t flag is used, adds the re/cpu column to the
default output format. Entries in this column express the
ratio of real CPU process time to total CPU time (cpu), which
includes user and system time. These entries appear after
entries for the cpu (3) column. The default output sort
remains unchanged.
4 avio The average number of input/output operations for each listed
command.
4a tio The total number of input/output operations for each listed
command.
5 k The average number of kiloblocks (blocks x 1024) of memory
used for each command process.
5a k*sec CPU storage-time integral in K-core seconds (seconds x 1024).
6 none The command name (a trailing * [asterisk] indicates a forked
program).
Other considerations for entries in the printed sa output are as follows: All times are expressed to nearest one hundredth. The default
format is sorted in descending order according to the values entered in column 3, cpu time. You should not share accounting files among
nodes in a distributed environment. Each node should have its own copy of the various accounting files. When you are also using
/usr/sbin/acct/* accounting commands, do not delete accounting records in the /var/adm/pacct process accounting source file because these
records also provide information for summary data files when the -s option is used.
EXAMPLES
To summarize accounting records for all commands entered in the /var/adm/pacct process database file, enter: sa -a Commands used only
once are summed with the entry ***other in the last column of the default output format. To summarize accounting records according to the
average number of kiloblocks of memory used for each command, enter: sa -k
FILES
Specifies the command path Process accounting database file. System process accounting summary file. User process accounting summary
file.
RELATED INFORMATION
Commands: acct(8), acctcms(8), acctcom(8), acctcon(8), acctmerg(8), acctprc(8), fwtmp(8), runacct(8) delim off
sa(8)