≡ Menu


Linux Display System Statistics Gathered From /proc

How do I display information from /proc such as memory, Load average, uptime, page activity, context, disk status, interrupts using a shell or perl script?
[click to continue…]

Linux: Check Network Connection Command

How do I check network connections under Linux using command line options?
[click to continue…]

Linux / UNIX killing a process and restarting the same

Q. How do I kill a process called inetd or foo and restart the same so that configuration file get updated?

A. Both UNIX and Linux supports POSIX reliable signals and POSIX real-time signals. Each signal has a current disposition, which determines how the process behaves when it is delivered the signal.

Generally following command is used
kill -1 process-pid

First get pid of inetd:
ps -e | grep inetd
Now force read inetd.conf:
kill -1 xinetd-pid

You can also use pkill command used to send signals. The pkill command allows the use of extended regular expression patterns and other matching criteria.
pkill -HUP process-name

Make syslog reread its configuration file
# pkill -HUP syslogd

Make xinetd reread its configuration file
# pkill -HUP inetd

How do I find out what network services are running or listing under Linux?

Q. How do I find out what network service are running under Linux operating system?

A. For security reason it is necessary to find out what services are running. With the help of netstat command, you can print information about the Linux networking subsystem including running services. It can display program name and PID for each socket belongs to. Use netstat as follows:

$ netstat -atup


$ netstat -atup | grep LISTEN


  • -t : Select all TCP services
  • -u : Select all UDP services
  • -a : Display all listening and non-listening sockets.
  • -p : Display the PID and name of the program to which each socket belongs