diff options
Diffstat (limited to 'sys/kern/kern_rctl.c')
-rw-r--r-- | sys/kern/kern_rctl.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c index 5fddbbb..a939758 100644 --- a/sys/kern/kern_rctl.c +++ b/sys/kern/kern_rctl.c @@ -99,17 +99,17 @@ static struct dict subjectnames[] = { { NULL, -1 }}; static struct dict resourcenames[] = { - { "cpu", RACCT_CPU }, - { "data", RACCT_DATA }, - { "stack", RACCT_STACK }, - { "core", RACCT_CORE }, - { "rss", RACCT_RSS }, - { "memlock", RACCT_MEMLOCK }, - { "nproc", RACCT_NPROC }, - { "nofile", RACCT_NOFILE }, - { "vmem", RACCT_VMEM }, - { "npts", RACCT_NPTS }, - { "swap", RACCT_SWAP }, + { "cputime", RACCT_CPU }, + { "datasize", RACCT_DATA }, + { "stacksize", RACCT_STACK }, + { "coredumpsize", RACCT_CORE }, + { "memoryuse", RACCT_RSS }, + { "memorylocked", RACCT_MEMLOCK }, + { "maxproc", RACCT_NPROC }, + { "openfiles", RACCT_NOFILE }, + { "vmemoryuse", RACCT_VMEM }, + { "pseudoterminals", RACCT_NPTS }, + { "swapuse", RACCT_SWAP }, { "nthr", RACCT_NTHR }, { "msgqqueued", RACCT_MSGQQUEUED }, { "msgqsize", RACCT_MSGQSIZE }, @@ -907,7 +907,7 @@ rctl_string_to_rule(char *rulestr, struct rctl_rule **rulep) error = str2int64(amountstr, &rule->rr_amount); if (error != 0) goto out; - if (RACCT_IS_IN_THOUSANDS(rule->rr_resource)) + if (RACCT_IS_IN_MILLIONS(rule->rr_resource)) rule->rr_amount *= 1000; } @@ -1152,8 +1152,8 @@ rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule) amount = rule->rr_amount; if (amount != RCTL_AMOUNT_UNDEFINED && - RACCT_IS_IN_THOUSANDS(rule->rr_resource)) - amount /= 1000; + RACCT_IS_IN_MILLIONS(rule->rr_resource)) + amount /= 1000000; sbuf_printf(sb, "%s:%s=%jd", rctl_resource_name(rule->rr_resource), @@ -1222,7 +1222,7 @@ rctl_racct_to_sbuf(struct racct *racct, int sloppy) if (sloppy == 0 && RACCT_IS_SLOPPY(i)) continue; amount = racct->r_resources[i]; - if (RACCT_IS_IN_THOUSANDS(i)) + if (RACCT_IS_IN_MILLIONS(i)) amount /= 1000; sbuf_printf(sb, "%s=%jd,", rctl_resource_name(i), amount); } |