Jump to content

userShowLimits on PMSS

From Pulsed Media Wiki


How much disk space, memory or traffic does your account have left, and is anything close to a limit? On a Pulsed Media seedbox or storage box, one command answers that from SSH:

userShowLimits

It reads the limits the server actually applies to your account, puts your current use next to each one, and adds a few figures about the server you share with other accounts. It only reads; it changes nothing.

Running it

  1. Log in over SSH. Seedbox access via FTP, SSH and SFTP covers how.
  2. Type userShowLimits and press Enter.

The command lives in your own ~/bin, which is already on your path. Run it as your account user; it refuses to run as root.

What it shows

Section What you see
Account Your username, the server name, the platform and Debian versions, your bonus, and whether Docker is enabled for your account.
Disk Disk space and file count (inodes): used, soft limit, hard limit, and how old the quota reading is. The reading is refreshed every minute; quota -s gives a live one.
Memory Current use against your memory limit, the RAM configured for your account, memory pressure, and how many times a program was stopped for running out of memory.
Processes Processes running against your process limit, and your open-files limit.
CPU Your CPU priority weight and any CPU cap.
Disk I/O Your disk priority weight and any read or write speed caps.
Traffic Upload over the past 30 days against your traffic limit, bonus traffic, inbound traffic, and the speed cap that applies after the limit, where one is set.
Past-30-day totals CPU hours, RAM GB-hours, and how much you read from and wrote to disk, shown inside the CPU, Memory and Disk I/O sections.
Server (shared by all accounts) Uptime, load average, CPU count, memory, pressure, and free space on the shared /home disk.

Reading the output

Here is part of the output from a 5 GiB test account, with the account name left out:

Disk
  blocks used     17.6 MiB / 5.0 GiB enforced (5.0 GiB configured) [-------------------------] 0.3% [quota-snapshot]
  files used      2791 / 15000 enforced [#####--------------------] 18.6% [quota-snapshot]
  snapshot age    4s [quota-snapshot]

Memory
  memory          265.0 MiB / 2.4 GiB enforced (2.0 GiB configured) [###----------------------] 10.6% [cgroup]
  memory pressure 4.2% [#------------------------] 4.2% [cgroup]
  memory status   LOW [cgroup]
  OOM kills       0 [cgroup]
  • enforced is the limit the server applies right now. configured is the value set for your account. They can differ, as in the memory line above: the enforced ceiling sits a little above the configured amount. On the CPU and disk priority lines the enforced figure is in the server's own units, a different scale from the configured weight, so the two numbers usually differ even when everything is set correctly.
  • unlimited means no limit is set for that item. n/a means the figure is not available for your account.
  • The bar shows how close you are to the limit: green below 70%, yellow from 70%, red from 90%. Colours appear only in an interactive terminal; set NO_COLOR=1 to turn them off.
  • The tag at the end of a line says where the figure comes from, for example [account-config] for your account settings, [cgroup] for the live limits and counters the server applies, and [quota-snapshot] for the minute-by-minute quota reading.

The server section describes the whole machine. A high load or a busy disk there may come from other accounts, not from yours. What the CPU and disk priority weights mean is explained in Seedbox and Storage Box Resource Tiers.

For scripts: --json and --jsonl

userShowLimits --json prints everything as one JSON document. userShowLimits --jsonl prints one JSON object per line, one line per figure, with the fields section, metric, value, limit, unit, percent and source. Every number names its unit, and sizes are in bytes, so a script can compare them directly. In JSON, null means the figure is unknown or has no limit, and a section that could not be read prints no lines in --jsonl (it shows as "available": false in --json).

To pick out one figure, grep its line:

userShowLimits --jsonl | grep '"blocks used"'

Troubleshooting

You see What it means
UserShowLimits: command not found Commands are case-sensitive. Type it with a lowercase u: userShowLimits.
userShowLimits: command not found Your server has not received the command yet. Our nightly maintenance brings it with the next platform update, and the Request a PMSS update button on your service page can ask for one sooner (when it applies). Until then, quota -s shows your disk and file limits, and the Diagnose button emails you your disk and memory use.
n/a (panel helper missing or outdated; refreshed by the next PMSS update) One section could not be read on your server yet. The rest of the output is still correct. The next platform update fixes it.
A large snapshot age The disk quota reading has not been refreshed recently. Run quota -s for a live reading, and open a ticket if the age keeps growing.

Frequently asked questions

How do I check my disk quota from SSH?

Run userShowLimits and look at the Disk section, or run quota -s. Both show disk space and file count with their soft and hard limits. Why there is a file limit at all, and how it is calculated: KB: Is there a fixed number of inodes per TB?

How much RAM can my seedbox use?

The Memory section shows your current use against the enforced limit, and the RAM configured for your account. If programs keep getting stopped, the OOM kills count goes up; KB: Why is my seedbox using so much RAM explains what to do.

How much traffic do I have left?

The Traffic section shows your upload over the past 30 days against your limit. The limit is a rolling 30-day window, not a calendar month: Pulsed Media Traffic Limits.

Why do the server figures look busy when my account is idle?

The server section covers every account on the machine. Your own share is in the sections above it.

Can userShowLimits change anything?

No. It only reads figures and prints them.

To compare what other plans include, see the Pulsed Media seedbox plans.

See also