• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » How To Manage, Monitor Processes On SSH

By Abhishek Ghosh June 15, 2017 1:43 pm Updated on June 15, 2017

How To Manage, Monitor Processes On SSH

Advertisement

This is an essential part to master after getting used with the basics of server management. Here is how to manage, monitor processes on SSH. Apart from the Kernel, these processes are main part of GNU/Linux and unix systems provide various ways to view and control the running processes. Note that you may be really be able to manipulate all the processes on a server with OpenVZ virtualization. In GNU/Linux, process is an abstraction of Linux (kernel) to represent a running program. Each of these process in consists of an address, a set of data structures within the kernel.

PID is the unique ID number assigned kernel to each process. UID is user identification number denoting the user who created it. EUID is effective user ID. UID and EUID are same, except for the programs that are setuid. setuid and setgid are Unix access rights flags that allow users to run an executable with the permissions of the executable’s owner or group respectively and to change behaviour in directories. GID is the group identification number of a process. EGID is related to the GID. A process can be a member of many groups at one time.

How To Manage Monitor Processes On SSH

 

How To Manage, Monitor Processes On SSH

 

ps is a command which is used for monitoring the processes. Versions of ps differ in their arguments and display, but all deliver the same information. The output of the ps command can show the above discussed PID, UID, priority, how much CPU time processes has consumed, how much memory process is using, current status and can control the processes. Process has codes and ps has standard notations :

Advertisement

---

R means process is running or can be executed.
D means uninterruptible sleep
S means interruptible sleep (process is waiting for some thing)
T means Traced or stopped
Z means Zombie – a terminated process but still present

USER is Username of the process’s owner
PID is Process ID
%CPU is the percentage of the CPU a process is consuming
%MEM is the percentage of memory a process is consuming
VSZ is virtual size of the process
RSS is number of pages in memory
TTY is control terminal ID
STAT is process status
START means the time the command started
TIME means CPU time the process has consumed
COMMAND is the name of the command

pstree command displays the processes in a tree format. You can run and check. We can stop process by (pid will be written as value) :

Vim
1
kill [argument] pid

To see a bit more information in realtime you can use :

Vim
1
topIn

We can stop by running :

Vim
1
kill -9 pid

That 9 is signal 9. The above is graceful command, the command to kill can be ignored. It will kill apache2 for sure :

Vim
1
sudo killall apache2

An option to filter the result by process name is pgrep :

Vim
1
pgrep -u root sshd

Read manuals for chained commands :

Vim
1
2
man strace
man pgrep

When you run strace on the sshd binary it outputs debugging information on how the program starts and what files it tries to access. From which we can use grep to list the /etc/ files which it tries to access :

Vim
1
sudo strace -e trace=file /usr/sbin/sshd |& grep '^open('|grep '/etc/'

A malware can hide as fake Apache web server process and consume huge resource. By experience, automatically eyes filter which can be odd.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How To Manage, Monitor Processes On SSH

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • Command Prompt Commands : Alphabetical list of all commands in Windows 7

    Command Prompt Commands in Windows 7 provides the user access to 180+ command line commands. Here is a list of 200 Command Prompt Commands in Windows 7.

  • How to Use pgrep and pkill Command

    On unix-like OS, the pkill command sends a signal to the processes while the pgrep command searches for processes currently running on the system. Originally, the pkill was written for using with the Solaris 7 (1998). kill, killall, pkill, pgrep can be used on all the GNU/Linux OS, MacOS X and Linux shell on Windows […]

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • How Affiliate Marketing WorksNovember 28, 2023
  • Phases of Product DevelopmentNovember 27, 2023
  • Sub-Areas of Direct MarketingNovember 27, 2023
  • Strengths and Weakness of Direct MarketingNovember 26, 2023
  • Bus Terminal BasicsNovember 26, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy