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
- XFS Filesystem has duplicate UUID problem
- Remove all frozen messages from exim mail queue
- Passwordless sudo setup
- Redirecting tcp / udp ports with socat
- Syntax highlighting in less
- Multi-conditional search and replace (clearing a ftp trojan script example)
- Creating self-extracting zip archives for both Linux and Windows
- Exim and hostname fqdn problem
- Disabling emacs splash screen
- Redirecting TCP ports with redir
LAST ADDED
- 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
- Evaluating expressions
- Using netstat
