scottwakeling / seat-inspect Goto Github PK
View Code? Open in Web Editor NEWDumps what logind/consolekit think of the current system status. A whoami for modern systems.
License: GNU General Public License v3.0
Dumps what logind/consolekit think of the current system status. A whoami for modern systems.
License: GNU General Public License v3.0
I tried to use seat-inspect
on my Gentoo box with systemd. Unfortunately, it failed with the following error:
merkur ~ # seat-inspect -v
[...]
- munin-node.service (loaded failed failed)
- result: exit-code since: 2015-03-26 15:40:21
- 2015-03-10 19:47:48 merkur systemd[1]: Starting Munin Node Service...
- Subject: Unit munin-node.service has begun start-up
- Defined-By: systemd
- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
- Unit munin-node.service has begun starting up.
Traceback (most recent call last):
File "/usr/bin/seat-inspect", line 953, in <module>
main()
File "/usr/bin/seat-inspect", line 948, in main
enumerate_units()
File "/usr/bin/seat-inspect", line 787, in enumerate_units
log_summaries(unit_type, units[unit_type])
File "/usr/bin/seat-inspect", line 799, in log_summaries
unit.log_summary("\t - ")
File "/usr/bin/seat-inspect", line 749, in log_summary
entry['_SOURCE_REALTIME_TIMESTAMP'].strftime("%Y-%m-%d %H:%M:%S"),
KeyError: '_SOURCE_REALTIME_TIMESTAMP'
This is my environment:
merkur ~ # systemctl --version
systemd 219
+PAM +AUDIT -SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP -LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN
merkur ~ # python --version
Python 3.4.1
The reason is that the failed unit didn't fill this field:
Thu 2015-03-26 15:40:21.160314 CET [s=a780400ce30b4ccab9f60dfd371a8f5e;i=7a876f;b=29bc1fab0461414c88a665af2d33291e;m=e69fb4;t=51231fecdf17a;x=357dc33ba8f03a43]
PRIORITY=6
_UID=0
_GID=0
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_SLICE=system.slice
_MACHINE_ID=8531fdb0416086742a05968e0000000d
_HOSTNAME=merkur
_TRANSPORT=stdout
SYSLOG_FACILITY=3
SYSLOG_IDENTIFIER=munin-node
MESSAGE=Can't locate Munin/Common/Defaults.pm in @INC (you may need to install the Munin::Common::Defaults module) (@INC contains: /etc/perl /usr/local/lib64/perl5/5.20.1/x86_64-linux-thread-multi /usr/local/lib64/perl5/5.20.1 /usr/li
_COMM=munin-node
_EXE=/usr/bin/perl
_CMDLINE=/usr/bin/perl -wT /usr/sbin/munin-node
_SYSTEMD_CGROUP=/system.slice/munin-node.service
_SYSTEMD_UNIT=munin-node.service
_BOOT_ID=29bc1fab0461414c88a665af2d33291e
_PID=1150
Any chance you can tag this with a version? Looks better for package purposes :)
I discovered just now a weird python3 feature, at this line the name "seat" is used.
I guess a typo cause seems not used elsewhere.
Seems that inside a class the "classname"-lowercase refer at "self" if not used as local variable.
'return "{}h".format(round(seconds / 86400))' probably wants to be "{}d" instead? :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.