1termy-monitor(1) General Commands Manual termy-monitor(1)
2
3
4
6 termy-monitor - TermySequence information monitor
7
8
10 termy-monitor [--initial|--monitor]
11
12
14 termy-monitor is a utility program executed by termy-server(1) to moni‐
15 tor the local system for useful information to report to terminal
16 clients. This includes the hostname, kernel version, time zone, and
17 primary IP address of the system, but can consist of any number of
18 arbitrary single-line UTF-8 key-value pairs. Run termy-monitor from a
19 shell prompt to see what information is reported.
20
21 termy-monitor has two modes of operation. When run with the --initial
22 option, the program should print lines of the form "key=value" on stan‐
23 dard output and then exit immediately. When run with no arguments, the
24 program should do the same thing, but may keep running until receipt of
25 SIGTERM or until its standard input is closed. The intent is for the
26 program to print an initial set of values on startup in the first mode,
27 then run continuously in the second mode, printing key-value pairs in
28 response to system changes.
29
30 Each termy-server(1) instance forks its own instances of termy-monitor
31 as necessary. In addition, two customizable scripts, monitor-script and
32 attr-script can be used to override or replace termy-monitor entirely,
33 see FILES below. On receipt of SIGUSR1, termy-server(1) restarts the
34 monitor program.
35
36 It is possible for terminal clients to send commands to the monitor
37 program, which will be written to its standard input, followed by a
38 newline. An advanced monitor program may support commands telling it
39 to report certain data. For example, the default termy-monitor imple‐
40 mentation will respond to the command "loadavg" by reporting the system
41 load average every ten seconds for the next half hour.
42
43
45 --initial
46 Print a set of initial key-value pairs immediately and then
47 exit.
48
49
50 --monitor
51 Run continuously, printing key-value pairs as changes occur,
52 until standard input is closed or SIGTERM is received. This is
53 the default behavior.
54
55
56 --help Print basic help
57
58
59 --version
60 Print version information
61
62
64 $XDG_CONFIG_HOME/termy-server/attr-script
65 /etc/termy-server/attr-script
66 /usr/lib/termy-server/attr-script
67
68 Programs executed by termy-server(1) to set system-specific UTF-8 key-
69 value pairs reported to clients. Only the first script found using the
70 order shown is executed. The program should print lines of the form
71 key=value on standard output and must exit quickly. Values output by
72 the program override the values printed by termy-monitor --initial.
73 These scripts are optional and are not required to be present.
74
75 $XDG_CONFIG_HOME/termy-server/monitor-script
76 /etc/termy-server/monitor-script
77 /usr/lib/termy-server/monitor-script
78
79 Programs executed by termy-server(1) to set system-specific UTF-8 key-
80 value pairs reported to clients. The program should print lines of the
81 form key=value on standard out and may run as long as necessary, how‐
82 ever it must exit on receipt of SIGTERM or when its standard input is
83 closed. Only the first script found using the order shown is executed,
84 and if a script is found, termy-monitor is not executed. These scripts
85 are optional and are not required to be present.
86
87
89 The default termy-monitor implementation obtains attributes from the
90 files os-release(5) and machine-info(5) and from calls to uname(3) and
91 getaddrinfo(3). On Linux, netlink(7) is used to monitor for network
92 address changes, and if sd-bus support was compiled in, the D-Bus
93 interfaces org.freedesktop.hostname1 and org.freedesktop.timedate1 are
94 used to monitor for hostname and timezone changes.
95
96 A small number of basic attributes, such as the UID, are set directly
97 by termy-server(1) and cannot be changed from the monitor or from
98 scripts.
99
100
102 termy-server(1)
103 TermySequence - https://termysequence.io
104
105
106
107TermySequence™ March 2018 termy-monitor(1)