👨‍💻
Mike's Notes
  • Introduction
  • MacOs Setup
    • System Preferences
    • Homebrew
      • Usage
    • iTerm
      • VIM
      • Tree
      • ZSH
    • Visual Studio Code
    • Git
    • SSH Keys
  • DevOps Knowledge
    • SRE
      • Scaling Reliably
        • Splitting a Monolith into Microservices
      • Troubleshooting Common Issues
      • Service Level Terminology
      • Toil
      • Monitoring
      • Release Engineering
      • Best Practices
      • On-Call
      • Alerting
    • Containers
      • Docker
        • Best Practices
          • Image Building
          • Docker Development
        • CLI Cheat Sheet
      • Container Orchestration
        • Kubernetes
          • Benefits
          • Cheat Sheet
          • Components
          • Pods
          • Workload Resources
          • Best Practices
    • Developer Portal 👨‍💻
      • Solution Overview 🎯
      • System Architecture 🏗️
      • Implementation Journey 🛠️
      • Cross-team Collaboration 🤝
      • Lessons & Future 🎓
    • Provisioning
      • Terraform
        • Installation
        • Usage
    • Configuration Management
      • Ansible
        • Benefits
        • Installation
    • Build Systems
      • Bazel
        • Features
  • Security
    • Secure Software Engineering
    • Core Concepts
    • Security Design Principles
    • Software Security Requirements
    • Compliance Standards and Policies
      • Sarbanes-Oxley (SOX)
      • HIPAA and HITECH
      • Payment Card Industry Data Security Standard (PCI-DSS)
      • General Data Protection Regulation (GDPR)
      • California Consumer Privacy Act (CCPA)
      • Federal Risk and Authorization Management Program (FedRAMP)
    • Privacy & Data
  • Linux Fundamentals
    • Introduction to Linux
    • Architecture
    • Server Administration
      • User / Groups
      • File Permissions
      • SSH
      • Process Management
    • Networking
      • Diagrams
      • Browser URL Example
      • Network Topologies
      • Signal Routing
      • DNS (Domain Name System)
      • SSL (Secure Sockets Layer)
      • TLS (Transport Layer Security)
  • System Design
    • Process
    • Kafka
      • Advanced Topics
    • URL Shortener
Powered by GitBook
On this page

Was this helpful?

  1. Linux Fundamentals
  2. Server Administration

Process Management

PreviousSSHNextNetworking

Last updated 3 years ago

Was this helpful?

Some useful commands that can be used to monitor the processes on Linux systems.

ps (process status)

The ps command is used to know the information of a process or list of processes.

If you get an error "ps command not found" while running ps command, do install procps package.

ps without any arguments is not very useful. Let's try to list all the processes on the system by using the below command.

We can use an additional argument with ps command to list the information about the process with a specific process ID.

We can use grep in combination with ps command to list only specific processes.

top

The top command is used to show information about Linux processes running on the system in real time. It also shows a summary of the system information.

For each process, top lists down the process ID, owner, priority, state, cpu utilization, memory utilization and much more information. It also lists down the memory utilization and cpu utilization of the system as a whole along with system uptime and cpu load average. Memory Management

In this section, we will study about some useful commands that can be used to view information about the system memory.

free

The free command is used to display the memory usage of the system. The command displays the total free and used space available in the RAM along with space occupied by the caches/buffers.

free command by default shows the memory usage in kilobytes. We can use an additional argument to get the data in human-readable format.

Checking Disk Space

In this section, we will study about some useful commands that can be used to view disk space on Linux.

df (disk free)

The df command is used to display the free and available space for each mounted file system.

du (disk usage)

The du command is used to display disk usage of files and directories on the system.

The below command can be used to display the top 5 largest directories in the root directory.

Systemd

Systemd is a system and service manager for Linux operating systems. Systemd units are the building blocks of systemd. These units are represented by unit configuration files.

The below examples shows the unit configuration files available at /usr/lib/systemd/system which are distributed by installed RPM packages. We are more interested in the configuration file that ends with service as these are service units.

Managing System Services

Service units end with .service file extension. Systemctl command can be used to start/stop/restart the services managed by systemd.

Command
Description

systemctl start name.service

Starts a service

systemctl stop name.service

Stops a service

systemctl restart name.service

Restarts a service

systemctl status name.service

Check the status of a service

systemctl reload name.service

Reload the configuration of a service

Logs

In this section, we will talk about some important files and directories which can be very useful for viewing system logs and applications logs in Linux. These logs can be very useful when you are troubleshooting on the system.

Reference:

https://unix.stackexchange.com/questions/106847/what-does-aux-mean-in-ps-aux