07-06-2011
Tracking Process to a particular
I've tried to see what I can find on my own but I'm coming up with goose eggs. Basically I was wondering if there was a way of querying the scheduler (or something similar) to track a process back to a particular CPU it's executing on at the time of the command. ps has a "cpu" output option but apparently only prints out a hyphen for every single process. I don't think setting processor affinity would work since I don't really know which processes are jacking up the iowait on this cpu and I don't want to just start offloading every process on the system onto a single cpu (if that were even possible, which I don't think it is, correct me if I'm wrong).
Basically, I need help tracking a running process to a cpu so I can see which of these state D's are causing the issue for this processor.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
OS: Solaris9, SPARC
Is there any way I can track the commands run by users from the shell prompt?
Example:
Somebody is deleting files from the system. Who it is is a mystery. That person obviously does not use bash prompt so there is no history. Is there anyway I can find out who... (5 Replies)
Discussion started by: mahatma
5 Replies
2. UNIX for Advanced & Expert Users
Hi,
we are using solaris8. we have some files disappear. I would like to know how to track who and when the files was remove ???
thanks, (7 Replies)
Discussion started by: xitrum
7 Replies
3. UNIX for Advanced & Expert Users
dear all,
I'm facing problem that is i have noticed from few days back that some body is deleting and making changes in the file from developement server where i'm working(in unix)
so i want to track that who is using the server, what performancr they are doing and each every thing which r... (5 Replies)
Discussion started by: panknil
5 Replies
4. UNIX for Advanced & Expert Users
Is there a way to track down what process is sending to a certain port? I have some thing pounding the network with requests to a multicast IP that doesn't exist. I have shut down all comms related processes and yet it is still there. Need a way to track the port or IP back to the process. Thanks... (3 Replies)
Discussion started by: mattmanuel
3 Replies
5. UNIX for Advanced & Expert Users
I need to find out the NTP Clients which are syncing with my NTP Server in a Unix(Linux/Solaris) Machine. For eg. How many Stratum 2 Servers sync the time with my Stratum1 Server. Is there any way to track it?
edit by bakunin: moving the thread to where it belongs: the technical forums. (4 Replies)
Discussion started by: hottyspidy
4 Replies
6. AIX
I have put in the "script" command in the .profile of a particular user id that tracks the terminal session when the user id logs in.
But when the user logs on to the server using FTP, how can this be tracked?
Any input will be appreciated. (1 Reply)
Discussion started by: ggayathri
1 Replies
7. Shell Programming and Scripting
Friends,
I have a script that triggers an reminder e-mail two weeks in advance which will remind the recipient to do a particular task. The problem with this script is, it sends the reminder e-mail 2 weeks before & it send the reminder e-mail only once. It by no means have a logic/functionality... (2 Replies)
Discussion started by: dahlia84
2 Replies
8. AIX
I am trying to generate a report to track dlpar operation performed on a MS and was wondering if anyone has done this before.
I can get history from HMC using lssvcevents , but this does not give me details as to what quantity was added or removed .
Any thoughts ?
Thanks (3 Replies)
Discussion started by: mk8570
3 Replies
9. Shell Programming and Scripting
Hello folks,
I am tracking a process httpd only. But when i am grepping it, it is returning me multiple process of httpd, second it is showing another process of monitorix-httpd. Below commands i have tried.
Current output
# ps ax |grep http
929 ? Ss 0:00 monitorix-httpd... (5 Replies)
Discussion started by: learnbash
5 Replies
10. UNIX for Advanced & Expert Users
Hello All,
I am using Linux. I have two scripts:
inner_script.ksh
main_wrapper_calling_inner.ksh
Below is the code snippet of the main_wrapper_calling_inner.ksh:
#!/bin/ksh
ppids=() ---> Main array for process ids.
fppids=() ---> array to capture failed process ids.
pcnt=0 --->... (5 Replies)
Discussion started by: dmukherjee
5 Replies
TASKSET(1) User Commands TASKSET(1)
NAME
taskset - set or retrieve a process's CPU affinity
SYNOPSIS
taskset [options] mask command [argument...]
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 may be specified in hexadecimal (with or without a
leading "0x"), or as a CPU list with the --cpu-list option. For example,
0x00000001 is processor #0,
0x00000003 is processors #0 and #1,
0xFFFFFFFF is processors #0 through #31,
32 is processors #1, #4, and #5,
--cpu-list 0-2,6
is processors #0, #1, #2, and #6.
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.
-c, --cpu-list
Interpret mask as numerical list of processors instead of a bitmask. Numbers are separated by commas and may include ranges. For
example: 0,5,8-11.
-p, --pid
Operate on an existing PID and do not launch a new task.
-V, --version
Display version information and exit.
-h, --help
Display help text 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 can change the CPU affinity of a process belonging to the same user. A user must possess CAP_SYS_NICE to change the CPU affinity of
a process belonging to another user. A user can retrieve the affinity mask of any process.
SEE ALSO
chrt(1), nice(1), renice(1), sched_getaffinity(2), sched_setaffinity(2)
See sched(7) for a description of the Linux scheduling scheme.
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 MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AVAILABILITY
The taskset command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/.
util-linux August 2014 TASKSET(1)