CH-J Toolsserver management over SSH
Menu
All guides and articles →

Monitoring Linux server via SSH

View CPU, RAM, swap, file systems, uptime, and network interfaces using the System Monitor plugin.

What does agentless monitoring mean?

For a basic overview of a Linux server, you don't always need to install a separate monitoring daemon. You can read the operating system status and run the necessary diagnostic commands via SSH. CH-J Tools offers System Monitor for this type of work. However, the term agentless does not mean dependency-free: the server needs functional SSH access, account permissions, and the corresponding interfaces or tools of its system.

Distinguish between a current live overview and a long-term history with alarms. If the client is not currently collecting data and you do not have another historical source, it is not possible to reconstruct all short spikes. Opening the panel after an outage will not create past measurements. For continuous monitoring, another established collection may be needed, the purpose and requirements of which differ from occasional SSH diagnostics.

This tutorial shows how to read basic metrics and how to verify them in the terminal. It does not assume that every program or distribution provides identical files. Containers, virtual machines, and hosts may display different ranges and limits. Therefore, determine which system or namespace you are monitoring before interpreting.

Set access with the least necessary rights

Use a separately identifiable account and key according to operational rules. Verify the host key via a trusted means before connecting for the first time. Monitoring should not be a reason to disable server identity checking or use a shared unrestricted root account. Many basic data are accessible without administrative privileges; sensitive process and log details may require more.

ssh spravce@server.example
whoami
hostname
cat /etc/os-release
uptime

Consider well-defined permissions for privileged controls. Universal passwordless sudo for any shell gives you much more than just reading a single metric. If a limited command wrapper is necessary in your environment, it should have a solid purpose, proper ownership, and input validation. It is not a good idea to make account security a secondary, unverified step.

Connect CH-J Tools to the same target and account that you are authenticated with. For bastion, VPN or non-standard port, keep the actual path. A correct result from a different profile is not proof that the report shows the intended server. Therefore, when working with multiple machines, always keep their identities visible.

Read CPU and load as different metrics

CPU describes the utilization of processor time in a given interval; load average is a smoothed count of certain running and waiting tasks in Linux. It is not a percentage of the same kind. On two vCPUs, one fully loaded thread might represent about half of the total capacity. However, in a process dump calculated against a single CPU, it might be 100 percent.

nproc
cat /proc/loadavg
top -b -d 1 -n 5 -o %CPU

When processing /proc/stat itself, interval CPU is usually derived from the difference in counters between samples. A single cumulative reading alone does not produce an immediate percentage. After a reboot, range change, or zero interval, the collection must be reset. Tools can also vary in how they handle iowait and virtualization time.

For a short peak, compare the panel refresh interval to the job length. You may miss a three-second job in a one-minute query or see it only as a low average. To find it, choose a short, limited series of process samples and an associated journal or timer. The live view is a guide, not an automatic explanation of each peak.

RAM and swap: free, available and moving are not the same

Linux uses some of the free capacity for cache. Therefore, low total free space does not necessarily mean a lack of RAM. Monitor available memory, workloads, pressure, and active swap moves. Busy swap may contain pages that have been used infrequently in the past and may not indicate a current problem.

free -h
swapon --show
vmstat 1 5
# Pokud kernel poskytuje PSI:
cat /proc/pressure/memory

The first summary sample of some tools may have a different time range than other intervals. Additionally, after a large process crashes, there may be enough memory again, even if there was an OOM before. Therefore, in case of an unexpected termination, add the kernel log and any cgroup limits. The current green number does not exclude a historical event.

For precise meaning, watch the units. MiB and MB have different bases, and the percentage of memory used may be defined differently by the tool. When comparing two panels, first unify the metric and range. A difference of a few percent may not indicate an error in the server or in the SSH transfer.

Disks: check space and inodes for correct path

The filesystem overview is useful for orientation, but a particular application may write to a mount other than /. When an upload or database fails, test the actual target path. For overlay, tmpfs, and container, compare the internal and host views. Not all mount lines represent a separate physical disk.

df -hT
df -i
findmnt -T /var/www
lsblk -f

Free blocks do not exclude exhausted inodes or account quota. The difference between df and du may be explained by open deleted files, metadata, snapshots, or data hidden by mounts. The panel itself may not provide detailed accounting for all of these layers. If the numbers do not explain the application behavior, follow up with targeted diagnostics instead of random deletions.

Capacity monitoring is also not a measure of storage latency. A completely free disk may be slow and full, but a stable volume can handle the required throughput at any given time. For performance, you need appropriate interval I/O metrics and application context, not just percentage occupancy.

Network counters need an interval and the right interface

The operating system often provides totals of bytes received and sent since a certain point in time. You get the speed from the difference in elapsed time. Restarting or restoring the interface can change or reset the counters. With virtual interfaces, bridges, and tunnels, the same packets can be reflected in multiple places, so simply adding them up can easily double the traffic.

ip -s link
ip address show
ip route show
ip -6 route show

Select the interface that corresponds to the actual path. Internal bridge operation is not the same as public uplink. Distinguish between bits and bytes and sample length; speed conversion requires both. Low current link load does not rule out loss, bad routing, or occasional DNS outage.

If you are having trouble with a specific service, test its protocol and port. Ping alone does not prove that SSH or HTTPS is working, and a blocked ping response does not mean that the server is down. Different network paths may work for IPv4 and IPv6. Therefore, refer to availability information for a specific test, not for an indefinite online status.

The cost of collection and the limitations of the long-term view

Every SSH query has a cost: authentication, running commands, reading and transmitting the result. Basic system counters tend to be cheaper than repeatedly recursively traversing a large tree or listing a long log history. Don't add expensive commands to your quick panel refresh just because they can be run over SSH.

Adjust the interval to the question and the number of servers. Occasional overview and hundreds of continuously queried machines have different requirements. If you need long-term time series, alarms, and monitoring when the client is disconnected, consider an established infrastructure for this purpose. Agentless diagnostics and continuous observability can be complementary; they are not automatically interchangeable features.

Protect saved results by their content. Mount names, process names, interfaces, and internal addresses can reveal infrastructure. Do not transfer output to a public report without review. The right metric, time, and anonymized context are often enough to explain a common problem.

Practical workflow in CH-J Tools and terminal

Open a verified server profile and System Monitor in a supported version of CH-J Tools. Check CPU, RAM, swap, file systems, uptime, and interfaces. If something seems unusual, first confirm the definition and scope of the metric in the terminal. Then identify the specific process, path, or service. The monitoring itself is not intended to automatically perform corrective restarts or cleanups.

  • Confirm the identity of the server and the logged-in account.
  • Compare several comparable samples and the actual impact on the application.
  • Verify the ambiguous value with a targeted read command.
  • Attach the log or status of the relevant service if you are looking for the cause.
  • Record the time, scope, and limitations of available history.

The result should be an explanation based on the available evidence. The phrase “two CPUs were busy during this interval and this process was running” is stronger than the general “the server has a problem.” SSH allows you to quickly see the status without your own monitoring daemon; however, good interpretation still requires knowledge of the metrics and the specific operational question.

Frequently asked questions

Do I need to install the CH-J Tools agent on the server?

For the basic monitoring described above via SSH, no. You still need an SSH server, available system interfaces or tools, and appropriate permissions.

Will I get back the graph for the time when the client was not connected?

Not automatically. History only exists if some established collection actually recorded it.

Why do the numbers differ by hypervisor?

Guest and host scope, time window, units, and billing method may vary. First, compare the metric definition.

Is monitoring via SSH completely overhead-free?

No. Even reading queries and running commands costs money. Adjust the interval and expensive checks to your query and number of servers.

Detailed documentation

Linux: memory data /proc/meminfo →

Linux: load average →

procps-ng: top →

OpenSSH: secure remote access →

Linux kernel: PSI pressure metrics →

Biometric unlock and security →

All tutorials by category →