summaryrefslogtreecommitdiff
path: root/src/shared/cgroup-show.c
AgeCommit message (Collapse)Author
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: move more locale-related calls to locale-util.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-09-01cgroup: drop "ignore_self" argument from cg_is_empty()Lennart Poettering
In all cases where the function (or cg_is_empty_recursive()) ignoring the calling process is actually wrong, as a process keeps a cgroup busy regardless if its the current one or another. Hence, let's simplify things and drop the "ignore_self" parameter.
2015-08-28cgroup-show: unescape cgroups on presentationLennart Poettering
Let's unescape cgroups on presentation, so that we show literal unit names.
2015-04-11shared: add terminal-util.[ch]Ronny Chevalier
2015-04-10shared: add process-util.[ch]Ronny Chevalier
2015-04-10shared: add formats-util.hRonny Chevalier
2015-02-03util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
2015-01-22cgroup-show: remove duplicated checkZbigniew Jędrzejewski-Szmek
After 3637713a20 it is not necessary anymore.
2015-01-22cgroup-show: don't hit assert, when the extra pids array is emptyLennart Poettering
2015-01-22shared/cgroup-show: simplify show_pid_array()Zbigniew Jędrzejewski-Szmek
int[] should not be used as pid_t[], even if happens to be same thing. Also deduplicating in a quadratic loop right before sorting is unnecessary. Remove custom greedy_realloc implementation.
2014-04-23delta: draw arrows with draw_special_char()Lennart Poettering
Let's unify generation of unicode chars at one place. Also, don't add an extra space into chars we print, except for the tree chars where this is really necessary.
2013-12-06Get rid of our reimplementation of basenameZbigniew Jędrzejewski-Szmek
The only problem is that libgen.h #defines basename to point to it's own broken implementation instead of the GNU one. This can be fixed by #undefining basename.
2013-10-14Fix bad assert in show_pid_arrayZbigniew Jędrzejewski-Szmek
This function should get the same treatment as other qsort uses did in 7ff7394 "Never call qsort on potentially NULL arrays". Reported-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-10-13ModernizationZbigniew Jędrzejewski-Szmek
Fixes minor leak in error path in device.c.
2013-10-13Never call qsort on potentially NULL arraysZbigniew Jędrzejewski-Szmek
This extends 62678ded 'efi: never call qsort on potentially NULL arrays' to all other places where qsort is used and it is not obvious that the count is non-zero.
2013-06-27core: general cgroup reworkLennart Poettering
Replace the very generic cgroup hookup with a much simpler one. With this change only the high-level cgroup settings remain, the ability to set arbitrary cgroup attributes is removed, so is support for adding units to arbitrary cgroup controllers or setting arbitrary paths for them (especially paths that are different for the various controllers). This also introduces a new -.slice root slice, that is the parent of system.slice and friends. This enables easy admin configuration of root-level cgrouo properties. This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in /dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is turned off by DevicePolicy=).
2013-04-18move _cleanup_ attribute in front of the typeHarald Hoyer
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-16util: replace decimal_str_max() by a typesafe macro DECIMAL_STR_WIDTH()Lennart Poettering
DECIMAL_STR_WIDTH() now works on any numeric type, and is easier to distingish from DECIMAL_STR_MAX(). This also replaces another manual implementaiton of ulog10 by this macro.
2013-04-16nspawn: introduce the new /machine/ tree in the cgroup tree and move ↵Lennart Poettering
containers there Containers will now carry a label (normally derived from the root directory name, but configurable by the user), and the container's root cgroup is /machine/<label>. This label is called "machine name", and can cover both containers and VMs (as soon as libvirt also makes use of /machine/). libsystemd-login can be used to query the machine name from a process. This patch also includes numerous clean-ups for the cgroup code.
2013-04-01shared/cgroup-show: fix leak of "pid"Zbigniew Jędrzejewski-Szmek
2013-01-16systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is ↵Lukas Nykryn
specified New file output.h with output flags and modes. --full parameter also for cgls and loginctl. Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup, show_cgroup_and_extra, show_cgroup_and_extra_by_spec). get_process_cmdline with max_length == 0 will not ellipsize output. Replace LINE_MAX with 0 in some calls of get_process_cmdline. [zj: Default to --full when under pager for clgs. Drop '-f' since it wasn't documented and didn't actually work. Reindent a bit. ]
2012-12-24systemctl: don't show cgroup field for a unit if cgroup is emptyLennart Poettering
2012-11-12util: nicer tree drawingsMichal Schmidt
Draw trees more similar to pstree/findmnt/lsblk/...
2012-11-02util : fallback to plain ASCII drawing if locale is not UTF-8Michal Schmidt
When printing cgroup and sysfs hierarchies, avoid using UTF-8 box drawing characters if the locale is not UTF-8. https://bugzilla.redhat.com/show_bug.cgi?id=871153
2012-10-23cgls: correctly ellipsize command lines for PIDs >= 1000000Mantas Mikulėnas
2012-05-08util: split-out path-util.[ch]Kay Sievers
2012-04-16systemctl: show main and control PID explicitly in cgroup-showLennart Poettering
In some cases the main/control PID of a service can be outside of the services cgroups (for example, if logind readjusts the processes' cgroup). In order to clarify this for the user show the main/control PID in the cgroup tree nonetheless, but mark them specially.
2012-04-16cgls: don't show empty cgroups by defaultLennart Poettering
2012-04-12move more common files to shared/ and add them to shared.laKay Sievers