When your service feels slow or an app keeps stopping, it helps to know which of your apps uses the most memory and processor time. Two commands over SSH show it. You see only your own programs, also those of apps that run in their own container. The commands were tested on our demo service with more than twenty apps installed.
How to connect: SSH how to get connected.
1. List Your Apps by Memory
ps -u $USER -o pid,rss,pcpu,etime,args --sort=-rss | head -15
The answer lists your programs, the largest first. It begins like this, for example:
PID RSS %CPU ELAPSED COMMAND 756024 594572 0.1 2-08:07:25 transmission-daemon 1739083 363444 0.0 1-17:07:55 next-server (v16.4.6) 1712329 337940 0.1 1-17:36:13 ./Cleanuparr 2503422 320320 0.0 10-03:51:26 /app/radarr/bin/Radarr -nobrowser -data=/config
- RSS: the memory the program uses now, in KiB.
594572is about 580 MiB. - %CPU: the average processor use since the program started, not the use at this moment (see step 2).
- ELAPSED: how long it has been running, here 2 days and 8 hours.
- COMMAND: the program with its path; it shows which app it belongs to.
Most names are easy to recognise. These are less obvious (/homeX/username is your home folder; the number differs from service to service):
| Command | App |
|---|---|
/homeX/username/bin/qbittorrent-nox | qBittorrent |
/opt/rtorrent-…/bin/rtorrent | rTorrent (ruTorrent) |
deluged and deluge-web | Deluge |
/app/radarr/bin/Radarr, /app/sonarr/bin/Sonarr and so on | Radarr, Sonarr, Prowlarr, Lidarr |
dotnet /app/Chaptarr.dll | Chaptarr |
node /usr/local/bin/flood | Flood |
next-server | Homarr |
python3 /app/sabnzbd/SABnzbd.py | SABnzbd |
mariadbd | the database of Nextcloud |
tailscaled | Tailscale Exit Node |
2. See the Current Use With top
top -u $USER -o %MEM
top shows your programs live, sorted by memory, and refreshes every few seconds. The column %CPU is the processor use at this moment, RES the memory, and COMMAND a shortened name: MainThr+, for example, is Flood, which ps in step 1 shows in full. Press q to quit. htop is installed too, if you prefer it.
The lines at the top of top, such as the total memory and the load average, describe the whole server, not your service; on Shared App Hosting, other users share that server. Compare your apps with each other instead.
3. What to Do About a Large App
- If the memory of an app grew over days, RESTART on the Apps tab starts it fresh.
- An app you do not use still takes memory while it runs. UNINSTALL it; note that this deletes its settings: Restart, Stop, Update, Reinstall or Uninstall an App: What Each Button Does.
- If an app stops or does not open, look at its log: An App Does Not Open or Does Not Work: What to Check.