Linux process monitoring commands
Kill a process on a port: sudo kill -9 $(sudo lsof -t -i:#port-no) top: Provides a list of all the active processes in the machine, refreshes every 5s vmstat: Displays statistics for virtual memory, the kernel, the number of threads, CPU activity, interrupts, the swap, etc. lsof: List of open files, it is a command line utility that is used to list the information about the files that are opened by various processes. In Linux, everything is a file, ( pipes, sockets, directories, devices, etc.). So by using lsof, you can get the information about any opened files. netstat: Netstat command displays various network-related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc. netstat -a | more: List all ports using netstat -a netstat -at: List all tcp ports using netstat netstat -ud: List all udp ports using netstat iostat: The iostat command in Linux is used for mo...
Comments
Post a Comment