5d634ca8cefb3d738d9efa70dfcc2f67d85d99e9 |
|
08-Feb-2016 |
Alexander Kuleshov <kuleshovmail@gmail.com> |
time-util: introduce usec_sub()
The dual_timestamp_from_realtime(), dual_timestamp_from_monotonic()
and dual_timestamp_from_boottime_or_monotonic() shares the same
code for comparison given ts with delta. Let's move it to the
separate inline function to prevent code duplication. |
519cffec890510f817740d07355e911b10c203b7 |
|
10-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
time-util: add parse_time(), which is like parse_sec() but allows specification of default time unit if none is specified
This is useful if we want to parse RLIMIT_RTTIME values where the common
UNIX syntax is without any units but refers to a non-second unit (µs in
this case), but where we want to allow specification of units. |
a8b626100b88b50c6c73fccf81b278d64e7e25a2 |
|
16-Sep-2015 |
Michal Schmidt <mschmidt@redhat.com> |
basic: nicer xsprintf and xstrftime assert messages
It's nicer if the assertion failure message from a bad use of xsprintf
actually mentions xsprintf instead of the expression the macro is
implemented as.
The assert_message_se macro was added in the previous commit as an
internal helper, but it can also be used for customizing assertion
failure messages like in this case.
Example:
char buf[10];
xsprintf(buf, "This is a %s message.\n", "long");
Before:
Assertion '(size_t) snprintf(buf, ELEMENTSOF(buf), "This is a %s
message.\n", "long") < ELEMENTSOF(buf)' failed at foo.c:6, function
main(). Aborting.
After:
Assertion 'xsprintf: buf[] must be big enough' failed at foo.c:6,
function main(). Aborting. |
45d7a8bb6c0e0caa4dd2a1cf1108b7ba2c0ebac4 |
|
28-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
cgtop: major modernizations
In preparation of the unified cgroup support, let's clean up cgtop:
a) rework time code to be based on "nsec_t" rather than "struct timespec"
b) Introduce long option --order= for selecting ordering
c) count number of processes only in the main hierarchy, don't bother
with the controller hierarchies. We don't allow orthogonal
hierarchies in systemd anymore, hence there's no point to check the
other hierarchies.
d) Deal with non-monotonic cpuacct values (see #749)
e) When sorting groups, don't do prefix compare when ordering by number
of tasks, since this is not accumulative for all children.
f) Actually make --cpu without parameter work
g) Don't output control characters when we get them as input.
Fixes #749. |
fbe550738d03b178bb004a1390e74115e904118a |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: introduce pseudo-machine ".host" refererring to the host system
Some of the operations machined/machinectl implement are also very
useful when applied to the host system (such as machinectl login,
machinectl shell or machinectl status), hence introduce a pseudo-machine
by the name of ".host" in machined that refers to the host system, and
may be used top execute operations on the host system with.
This copies the pseudo-image ".host" machined already implements for
image related commands.
(This commit also adds a PK privilege for opening a PTY in a container,
which was previously not accessible for non-root.) |