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
- XFS Filesystem has duplicate UUID problem
- Disabling reverse dns lookups in ssh
- Redirecting tcp / udp ports with socat
- Enabling remote desktop on a VirtualBox Machine
- Users with /bin/false shell to login on vsftpd
- Remove all frozen messages from exim mail queue
- dropbear rsa key problem
- Disabling ssh password authentication
- Passwordless sudo setup
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
