Questions tagged [systemd-run]

11 questions
5
votes
1 answer

What does "?" means in ls -l output?

I saw a few files/dir are inaccessible even to the root user: find: ‘/run/user/1000/gvfs’: Permission denied. So I went a level deeper and ran ls -l; below is the output. /run/user/125# ll ls: cannot access 'gvfs': Permission denied total…
samshers
  • 668
  • 1
  • 8
  • 20
5
votes
1 answer

How to limit CPU usage with systemd-run

I have a buggy program which uses 100% CPU even when it's idle. Since fixing it isn't practical at the moment, I'd like to just limit it to be able to use no more than 10% CPU. However no matter what I do, the process always chews up 100% of one…
Malvineous
  • 6,524
  • 5
  • 52
  • 76
3
votes
1 answer

Running systemd service synchronously / in foreground

I would like to replace my Xsession with my custom program (kiosk-like setup), previously I was just setting STARTUP variable in my .xsessionrc file like: STARTUP='/path/to/my/program' Now I want to wrap my program as a systemd service to utilize…
reddot
  • 266
  • 3
  • 10
2
votes
0 answers

Running command under systemd slice works for root, but not user

I'm trying to execute a command under some resource limits. This correctly limits my-bin to just 1 CPU core. I'm able to verify with htop. $ sudo systemd-run -p AllowedCPUs=0 -- ./my-bin However, this doesn't work. htop shows all cores active. $…
425nesp
  • 406
  • 4
  • 12
1
vote
1 answer

How to list units with specific properties?

I use systemd-run --user a lot to run things. I want to be able to list only those transient units, but there seems to be no option to systemctl --user list-units to do it. I also cannot list the Transient propery in systemctl --user list-units…
neingeist
  • 111
  • 3
1
vote
0 answers

Can systemd-run create temporary cgroups for temporary commands with resource limits?

I'd like to limit the resource consumption of temporary commands with cgroup created by systemd-run, similar to what cgcreate does instead, but I'm not sure if that makes sense? I'd like to make sure I'm trying this correctly, thank you…
1
vote
1 answer

using systemd-run to replace 'at' commands

What is the best way of using systemd-run in place of a simple sudo -u xxx at -f backupJ-447.cmd 03:10 Our org has gone systemd mad and no longer installs 'at', 'batch' and cron is depricated on our new systems. I need a way to scheule occasional…
ferg
  • 11
  • 2
0
votes
0 answers

How to systemd-run a process and collect the exit status?

I want to wrap my command in a systemd-run and wait on it, redirect the logs to stdout and collect the exit status of the command. I want to systemd-run --remain-after-exit because I want to collect it later, and I also want systemd-run --wait to…
KamilCuk
  • 850
  • 8
  • 16
0
votes
1 answer

How do I pass a command group to systemd-run?

Why can't I pass a command group to systemd-run like this? $ systemd-run --on-active=1 { cp file1 file2 && echo hi; } Failed to find executable {: No such file or directory I tried various combinations of quoting, braces, and subshells but to no…
ckattmann
  • 3
  • 3
0
votes
1 answer

Why systemd-run memory limiting cause crash of program?

I am using different methods for different programs to control their resource management. When I used systemd-run for gimp(GNU image manipulation program), when picture's memory requirement is higher than limit(i.e. 300MB which I set), program…
user458762
0
votes
1 answer

Does /dev, /run and /sys exist on HDD (if so what is there location if it can be meaningfully traced)?

At the time of Linux installation, i have mentioned only one filesystem (/dev/sda1 -> ext4 -> / ). But for dev, run, proc, sys - Linux is creating addition FS which is inferable from mount. $ mount sysfs on /sys type sysfs…
samshers
  • 668
  • 1
  • 8
  • 20