01-19-2006
Script for system performance
I need to prepare script which will run as background process ever 30 mins to collect the following information
1. Memory usage.
2. CPU usage.
3. Number processors running.
4. System resource (CPU and Memory) used by each process.
5. Number of sessions logged
PLEASE HELP ME OUT FROM THIS
Thanks in advance
-----------
VASTARE
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Could someone point me in the correct direction or web link containing instructions for installing the System Performance Tool (aka STP) software on an IBM-AIX version 4.? machine. My client has the software (that came from their original server) on a 3" floppy. Thanks! (1 Reply)
Discussion started by: Pam
1 Replies
2. UNIX for Dummies Questions & Answers
I'm running Solaris 8 on a Sun ULTRA 5(SPARC II CPU, 270 MHz) with 64 Mb of RAM.
The machine is very, very slow even doing normal tasks such as reading mail....... I'm nearly afraid to ask it to do some real work.......
On checking out the machine(which I only received last week from our IT... (1 Reply)
Discussion started by: Kanu77
1 Replies
3. Linux
Anyone know how to fetch the system performance information by the function except the system command? These information includes CPU load,memory usage,network load,disk capacity,etc. (5 Replies)
Discussion started by: Frank2004
5 Replies
4. Shell Programming and Scripting
Hi,
I need a script which runs in the solaris system and check the system performance eg .CPU usage, and send an alert when an thresold level is
reached.
kindly help me on this. (3 Replies)
Discussion started by: jayaramanit
3 Replies
5. Solaris
Hi All,
Can someone help me out knowing all commands for getting system performance on Solaris machines.
Thanks in advance,
Yagami Light. (5 Replies)
Discussion started by: Yagami
5 Replies
6. Solaris
I have received an order from upper level manager to "verify system information via Perform/predict'. They asks me to *predict* the system performance. How can I do it as a system admin without the help of application admins and DBAs?
Thanks! (6 Replies)
Discussion started by: aixlover
6 Replies
7. HP-UX
hi every body i want to check system performance i usually use glance,top,sar and swapinfo but i confused in something so i need explanation about memory issue
first i want check the memory usage i used glance i found this parameter so i need one shows me the differences between these... (2 Replies)
Discussion started by: maxim42
2 Replies
8. Solaris
Hi
I need to know the system performance :
# echo "::memstat" | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 358022 2797 9%
ZFS File Data 2427072 18961 59%
Anon 1096938 8569 27%
Exec and libs 12020 93 0%
Page cache 73859 577 2%
Free... (4 Replies)
Discussion started by: dimitris
4 Replies
LEARN ABOUT DEBIAN
taskset
TASKSET(1) User Commands TASKSET(1)
NAME
taskset - retrieve or set a process's CPU affinity
SYNOPSIS
taskset [options] mask command [arg]...
taskset [options] -p [mask] pid
DESCRIPTION
taskset is used to set or retrieve the CPU affinity of a running process given its PID or to launch a new COMMAND with a given CPU affin-
ity. CPU affinity is a scheduler property that "bonds" a process to a given set of CPUs on the system. The Linux scheduler will honor the
given CPU affinity and the process will not run on any other CPUs. Note that the Linux scheduler also supports natural CPU affinity: the
scheduler attempts to keep processes on the same CPU as long as practical for performance reasons. Therefore, forcing a specific CPU
affinity is useful only in certain applications.
The CPU affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit
corresponding to the last logical CPU. Not all CPUs may exist on a given system but a mask may specify more CPUs than are present. A
retrieved mask will reflect only the bits that correspond to CPUs physically on the system. If an invalid mask is given (i.e., one that
corresponds to no valid CPUs on the current system) an error is returned. The masks are typically given in hexadecimal. For example,
0x00000001
is processor #0
0x00000003
is processors #0 and #1
0xFFFFFFFF
is all processors (#0 through #31).
When taskset returns, it is guaranteed that the given program has been scheduled to a legal CPU.
OPTIONS
-a, --all-tasks
Set or retrieve the CPU affinity of all the tasks (threads) for a given PID.
-p, --pid
Operate on an existing PID and do not launch a new task.
-c, --cpu-list
Specify a numerical list of processors instead of a bitmask. The numbers are separated by commas and may include ranges. For exam-
ple: 0,5,7,9-11.
-h, --help
Display usage information and exit.
-V, --version
Display version information and exit.
USAGE
The default behavior is to run a new command with a given affinity mask:
taskset mask command [arguments]
You can also retrieve the CPU affinity of an existing task:
taskset -p pid
Or set it:
taskset -p mask pid
PERMISSIONS
A user must possess CAP_SYS_NICE to change the CPU affinity of a process. Any user can retrieve the affinity mask.
AUTHOR
Written by Robert M. Love.
COPYRIGHT
Copyright (C) 2004 Robert M. Love
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
chrt(1), nice(1), renice(1), sched_setaffinity(2), sched_getaffinity(2)
See sched_setscheduler(2) for a description of the Linux scheduling scheme.
AVAILABILITY
The taskset command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux April 2003 TASKSET(1)