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. 594572 is 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):

CommandApp
/homeX/username/bin/qbittorrent-noxqBittorrent
/opt/rtorrent-…/bin/rtorrentrTorrent (ruTorrent)
deluged and deluge-webDeluge
/app/radarr/bin/Radarr, /app/sonarr/bin/Sonarr and so onRadarr, Sonarr, Prowlarr, Lidarr
dotnet /app/Chaptarr.dllChaptarr
node /usr/local/bin/floodFlood
next-serverHomarr
python3 /app/sabnzbd/SABnzbd.pySABnzbd
mariadbdthe database of Nextcloud
tailscaledTailscale 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

Was this answer helpful? 0 Users Found This Useful (0 Votes)