Fast process lookup and signaling
pgrep and pkill commands used for to lookup a process by attribute. To quick find all instances of ssh running, for user root, execute the following command:
pgrep -u root -l ssh
To kill a process, or send a signal use the "pkill". For example, to make syslog reread its configuration file:
pkill -HUP syslogd
Another command command is pidof that can tell you how many processes are running. This can be useful for detecting DOS attacks.
pidof sshd
4783 4781 30008 30006 29888 29886 2246
Above there are 7 sshd's running.
Reference: "Tcpdump, Raw Socket and Libpap Tutorial" at http://souptonuts.sourceforge.net/tcpdump_tutorial.html.
- 0 Comment
- Mike Chirico
- 12 Oct 2008, 23:26
-
You must be login first or sign-up for an account to post comments.
USERBOX
CATEGORIES
MOST READ TODAY
- Syntax highlighting in less
- Learning all of the available system calls
- XFS Filesystem has duplicate UUID problem
- Redirecting tcp / udp ports with socat
- Working with Linux kernel oops messages
- Multi-conditional search and replace (clearing a ftp trojan script example)
- Viewing specific message in exim mail queue
- Deleting A File By It's Inode Value
- Learning which libraries are used for a binary
- Reverse telnet on Linux using netcat
LAST ADDED
- Using iPhone internet sharing over bluetooth under Linux
- Using USB sound card with amarok
- Multi-conditional search and replace (clearing a ftp trojan script example)
- Disabling ipv6 functionality
- How to convert a mp3 file
- How to choose the fastest Debian mirror
- Disabling reverse dns lookups in ssh
- Rewriting destination ip address
- Deleting A File By It's Inode Value
- Learning which libraries are used for a binary
