04-28-2009
Specific User Proceses
Hi, I am trying to find out if it is possible using the bash shell in unix to find out from a list of processes which of those belong to a specific user e.g user1?
Also is it possible to find out which processes currently running are using alot of resources?
All help is appreciated. Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
My issue is that I want to look for specific users that have their first and last initial followed by four numbers. For example:
ab1234
I've already got the user ID's out of the passwd file
more passwd | awk -F ":" '{print $1}' > userids
I just need to know how to just pick... (8 Replies)
Discussion started by: LinuxRacr
8 Replies
2. Solaris
Hi,
how do I query available printer options and set defaults for my print requests?
I have found lpoptions (man lpoptions(1)) on the web but it doesn't seem to be available under Solaris and I can't work out how else to do it.
Thanks,
Bob (2 Replies)
Discussion started by: BobD
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I like to allow an user to permit an root command " /usr/ucb/ps -auxwww", do you know how?
Kind regards
Mehrdad (6 Replies)
Discussion started by: mehrdad68
6 Replies
4. Shell Programming and Scripting
is is possible to grant user access to only one subdirectory? example
a. create ftp user with read/write/delete access (ftp user doesnt belong to uguys group)
$ cd /etc/mydir
$ls
file1 file2
$ls -al
-rw-rw-r-x 2 unixguy uguys 96 Dec 8 12:53 file1
-rw-rw-r-x 2 unixguy uguys 96... (0 Replies)
Discussion started by: lhareigh890
0 Replies
5. Solaris
is is possible to grant user access to only one subdirectory? example
a. create ftp user with read/write/delete access (ftp user doesnt belong to uguys group)
$ cd /etc/mydir
$ls
file1 file2
$ls -al
-rw-rw-r-x 2 unixguy uguys 96 Dec 8 12:53 file1
-rw-rw-r-x 2 unixguy uguys 96 Dec 8... (1 Reply)
Discussion started by: lhareigh890
1 Replies
6. AIX
Guy's
I'm looking for where the password to be saved in AIX or I'm looking to by one step or one script to set and fix the password for this user appuser to be abc1234 , I'm using this command
passwd appuser
but it's asking me to put new password I don't like this I want to set the... (2 Replies)
Discussion started by: Mr.AIX
2 Replies
7. UNIX for Advanced & Expert Users
Dear All,
I need help on allow/disallow OS user to telnet to specific IP address from client side?
I have one Solaris 10 machine, I will permit OS user to telnet to specific IP address. (5 Replies)
Discussion started by: mamun_bu
5 Replies
8. UNIX for Advanced & Expert Users
Is there a way to allow a user to use sudo cp on a specific directory and only a specific file? (6 Replies)
Discussion started by: cokedude
6 Replies
9. Cybersecurity
Hi All,
Please let me how to enable user specific audit in Linux server.
Say i have specific user namely admin1,admin2,admin3 apart from the normal users, user1,2,3.....userN.
How to enable audit for users admin1,admin2 and admin3 alone.
Also please let me know, if this would have any... (4 Replies)
Discussion started by: pradebban
4 Replies
10. Shell Programming and Scripting
Im currently trying to design a user specific script
by this i mean i need a username that will verify the user exists, then run script directly off the user input i.e
username : ted
then the script will be ran to ps aux grep ted (7 Replies)
Discussion started by: bellz
7 Replies
PIDOF(8) Linux System Administrator's Manual PIDOF(8)
NAME
pidof -- find the process ID of a running program.
SYNOPSIS
pidof [-s] [-c] [-n] [-x] [-o omitpid[,omitpid..]] [-o omitpid[,omitpid..]..] program [program..]
DESCRIPTION
Pidof finds the process id's (pids) of the named programs. It prints those id's on the standard output. This program is on some systems
used in run-level change scripts, especially when the system has a System-V like rc structure. In that case these scripts are located in
/etc/rc?.d, where ? is the runlevel. If the system has a start-stop-daemon (8) program that should be used instead.
OPTIONS
-s Single shot - this instructs the program to only return one pid.
-c Only return process ids that are running with the same root directory. This option is ignored for non-root users, as they will be
unable to check the current root directory of processes they do not own.
-n Avoid stat(2) system function call on all binaries which are located on network based file systems like NFS. Instead of using this
option the the variable PIDOF_NETFS may be set and exported.
-x Scripts too - this causes the program to also return process id's of shells running the named scripts.
-o omitpid
Tells pidof to omit processes with that process id. The special pid %PPID can be used to name the parent process of the pidof pro-
gram, in other words the calling shell or shell script.
EXIT STATUS
0 At least one program was found with the requested name.
1 No program was found with the requested name.
NOTES
pidof is actually the same program as killall5; the program behaves according to the name under which it is called.
When pidof is invoked with a full pathname to the program it should find the pid of, it is reasonably safe. Otherwise it is possible that
it returns pids of running programs that happen to have the same name as the program you're after but are actually other programs. Note
that that the executable name of running processes is calculated with readlink(2), so symbolic links to executables will also match.
SEE ALSO
shutdown(8), init(8), halt(8), reboot(8), killall5(8)
AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
01 Sep 1998 PIDOF(8)