Skip to content

Commit 87d2d6c

Browse files
committed
Updated documentation in README.md.
1 parent 035afcb commit 87d2d6c

File tree

8 files changed

+157
-60
lines changed

8 files changed

+157
-60
lines changed

β€ŽREADME.md

Lines changed: 157 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
# System-Tools
2-
Tools for Basic System Management
1+
<h1 align="center">
2+
System-Tools<br />
3+
<span style="font-size: 75%">Tools for Basic System Management</span><br />
4+
<a href="https://www.nntb.no/~dreibh/system-tools/">
5+
<span style="font-size: 75%;">https://www.nntb.no/~dreibh/system-tools</span>
6+
</a>
7+
</h1>
38

4-
## Description
59

6-
System Tools is a collection of helpful tools for basic system management of Linux and FreeBSD systems:
10+
# πŸ’‘ What is System-Tools?
11+
12+
System-Tools is a collection of helpful tools for basic system management of Linux and FreeBSD systems:
713

814
- [System-Info](#System-Info) (display banners and system information),
915
- [System-Maintenance](#system-maintenance) (run basic system maintenance tasks),
@@ -14,23 +20,75 @@ System Tools is a collection of helpful tools for basic system management of Lin
1420
- [Try-Hard](#try-hard) (run a command, with configurable retries on failure),
1521
- [Random-Sleep](#random-sleep) (wait for random time span, with support of fractional seconds).
1622

17-
### System-Info
23+
# πŸ“š System-Info
1824

1925
System-Info displays basic status information about the system: hostname, uptime, CPU, memory statistics, disk space statistics, SSH public key hashes, and networking information. Furthermore, it can be configured to show one or more banners (for example, a project name). System-Info can be configured to be automatically run when logging in, providing the user an up-to-date overview of the system.
2026

2127
One main purpose of System-Info is to run on login, to particularly show a nice login banner (for example, a project or company logo) and then present the basic system information. For this purpose, System-Info can be configured with banner scripts (by default looked up in /etc/system-info.d or /usr/local/etc/system-info.d), which are processed in alphabetically descending order by file name, like:
2228

23-
- ``95-application-logo``,
24-
- ``90-project-logo``,
25-
- ``60-department-logo``,
26-
- ``50-company-logo``,
27-
- ``01-example``.
29+
* <tt>95-application-logo</tt>,
30+
* <tt>90-project-logo</tt>,
31+
* <tt>60-department-logo</tt>,
32+
* <tt>50-company-logo</tt>,
33+
* <tt>01-example</tt>.
2834

2935
The names of all scripts MUST begin with two decimal numbers. That is, scripts must be named [0-9][0-9]... to be processed by System-Info!
3036

3137
If one of the scripts exits with non-zero exit code, the processing of further banner scripts is stopped. This can be used for preconfiguring a system for example with a department and company logo, where the company logo script terminates further processing. A modified system for a certain project can add a project logo as well. The project logo script may terminate further processing, not showing department and company logos. This may be combined with packaging scripts, for example adding an application logo as part of the application's install package (like adding a script 95-application-logo).
3238

33-
### System-Maintenance
39+
Some examples, using the [banner-helper](src/System-Info/system-info.d/banner-helper) library provided by System-Info:
40+
41+
<table summary="System-Info Banner Examples">
42+
<tr>
43+
<td style="text-align: center; vertical-align: center;">
44+
<a href="src/System-Info/system-info.d/01-example.webp">
45+
<img alt="" src="src/System-Info/figures/01-example.webp" width="100%" height="100%" />
46+
</a><br />
47+
<a href="src/System-Info/system-info.d/01-example">01-example</a><br />
48+
The default example.
49+
</td>
50+
<td style="text-align: center; vertical-align: center;">
51+
<a href="src/System-Info/system-info.d/09-hostname-example.webp">
52+
<img alt="" src="src/System-Info/figures/09-hostname-example.webp" width="100%" height="100%" />
53+
</a><br />
54+
<a href="src/System-Info/system-info.d/09-hostname-example">09-hostname-example</a><br />
55+
Dynamically showing the hostname of the machine.
56+
</td>
57+
<td style="text-align: center; vertical-align: center;">
58+
<a href="src/System-Info/system-info.d/10-company-logo-example.webp">
59+
<img alt="" src="src/System-Info/figures/10-company-logo-example.webp" width="100%" height="100%" />
60+
</a><br />
61+
<a href="src/System-Info/system-info.d/10-company-logo-example">10-company-logo-example</a><br />
62+
A <a href="https://www.simulamet.no/">SimulaMet</a> company branding.
63+
</td>
64+
</tr>
65+
<tr>
66+
<td style="text-align: center; vertical-align: center;">
67+
<a href="src/System-Info/system-info.d/10-nornet.webp">
68+
<img alt="" src="src/System-Info/figures/10-nornet.webp" width="100%" height="100%" />
69+
</a><br />
70+
<a href="src/System-Info/system-info.d/10-nornet">10-nornet</a><br />
71+
A <a href="https://www.nntb.no/">NorNet</a> project branding.
72+
</td>
73+
<td style="text-align: center; vertical-align: center;">
74+
<a href="src/System-Info/system-info.d/18-neat.webp">
75+
<img alt="" src="src/System-Info/figures/18-neat.webp" width="100%" height="100%" />
76+
</a><br />
77+
<a href="src/System-Info/system-info.d/18-neat">18-neat</a><br />
78+
A <a href="https://neat.nntb.no/">NEAT</a> project branding.
79+
</td>
80+
<td style="text-align: center; vertical-align: center;">
81+
<a href="src/System-Info/system-info.d/30-rsplib.webp">
82+
<img alt="" src="src/System-Info/figures/30-rsplib.webp" width="100%" height="100%" />
83+
</a><br />
84+
<a href="src/System-Info/system-info.d/30-rsplib">30-rsplib</a><br />
85+
A <a href="https://www.nntb.no/~dreibh/rserpool/">RSPLIB</a> project branding.
86+
</td>
87+
</tr>
88+
</table>
89+
90+
91+
# πŸ“š System-Maintenance
3492

3593
System-Maintenance runs some system maintenance tasks to keep the system clean and up to date. These tasks are:
3694

@@ -47,124 +105,163 @@ System-Maintenance runs some system maintenance tasks to keep the system clean a
47105

48106
The typical usage is quite simple, e.g.:
49107

50-
``sudo System-Maintenance``
108+
<pre>
109+
sudo System-Maintenance
110+
</pre>
111+
51112

52-
### Print-UTF8
113+
# πŸ“š Print-UTF8
53114

54115
Print-UTF8 is a simple program to print UTF-8 strings in the console with options for indentation, centering, separator as well as size/length/width information. It can e.g.&nbsp;be utilised for printing System-Info banners, or for displaying error messages like this classic Amiga [Guru Meditation](https://en.wikipedia.org/wiki/Guru_Meditation) example:
55116

56-
print-utf8 -n -s "\e[1;31;40;5mβ–ˆ" "β–€" "β–ˆ\e[0m"
57-
echo -e "Software Failure. Press left mouse button to continue.\nGuru Meditation #00000004.48454C50" | \
58-
print-utf8 -n -C "\e[1;31;40;5mβ–ˆ\e[25m" "\e[5mβ–ˆ\e[0m"
59-
print-utf8 -n -s "\e[1;31;40;5mβ–ˆ" "β–„" "β–ˆ\e[0m"
117+
<pre>
118+
print-utf8 -n -s "\e[1;31;40;5mβ–ˆ" "β–€" "β–ˆ\e[0m"
119+
echo -e "Software Failure. Press left mouse button to continue.\nGuru Meditation #00000004.48454C50" | \
120+
print-utf8 -n -C "\e[1;31;40;5mβ–ˆ\e[25m" "\e[5mβ–ˆ\e[0m"
121+
print-utf8 -n -s "\e[1;31;40;5mβ–ˆ" "β–„" "β–ˆ\e[0m"
122+
</pre>
123+
124+
<p style="text-align: center;">
125+
<a href="guru.webp">
126+
<img alt="A Guru Meditation Example with Print-UTF8" src="src/Print-UTF8/figures/guru.webp" width="50%" />
127+
</a>
128+
</p>
129+
60130

61-
### Text-Block
131+
# πŸ“š Text-Block
62132

63133
Text-Block is a flexible tool for inserting, replacing or deleting text blocks in files or streams. The blocks to be modified can be selected by begin/end tags, or line numbers. The static pages of this website are generated by using Text-Block to insert contents like publications and project lists, add new software releases, etc.
64134

65-
For example, the publications list in [index.html](https://www.nntb.no/~dreibh/index.html) is placed between the tags '<!-- BEGIN-OF-PUBLICATIONS -->' and '<!-- END-OF-PUBLICATIONS -->'. Text-Block can be used to manipulate this block:
135+
For example, the publications list in [index.html](https://www.nntb.no/~dreibh/index.html) is placed between the tags '&lt;!-- BEGIN-OF-PUBLICATIONS --&gt;' and '&lt;!-- END-OF-PUBLICATIONS --&gt;'. Text-Block can be used to manipulate this block:
136+
137+
* To extract the publications list to standard output:
138+
139+
<pre>
140+
text-block -i index.html --begin-tag '<!-- BEGIN-OF-PUBLICATIONS -->' --end-tag '<!-- END-OF-PUBLICATIONS -->' --extract
141+
</pre>
142+
143+
* To delete the publications list and write the page to output.html:
144+
145+
<pre>
146+
text-block -i index.html -o output.html --begin-tag '<!-- BEGIN-OF-PUBLICATIONS -->' --end-tag '<!-- END-OF-PUBLICATIONS -->' --delete``
147+
</pre>
66148

67-
* To extract the publications list to standard output:<br/>
68-
``text-block -i index.html --begin-tag '<!-- BEGIN-OF-PUBLICATIONS -->' --end-tag '<!-- END-OF-PUBLICATIONS -->' --extract``
149+
* To replace the publications list by contents from update.block (e.g.&nbsp; generated by [BibTeXConv](https://www.nntb.no/~dreibh/bibtexconv/)), and write the page to output.html:
69150

70-
* To delete the publications list and write the page to output.html:<br/>
71-
``text-block -i index.html -o output.html --begin-tag '<!-- BEGIN-OF-PUBLICATIONS -->' --end-tag '<!-- END-OF-PUBLICATIONS -->' --delete``
151+
<pre>
152+
text-block -i index.html -o output.html --begin-tag '<!-- BEGIN-OF-PUBLICATIONS -->' --end-tag '<!-- END-OF-PUBLICATIONS -->' --replace update.block
153+
</pre>
72154

73-
* To replace the publications list by contents from update.block (e.g.&nbsp; generated by [BibTeXConv](https://www.nntb.no/~dreibh/bibtexconv/)), and write the page to output.html:<br/>
74-
``text-block -i index.html -o output.html --begin-tag '<!-- BEGIN-OF-PUBLICATIONS -->' --end-tag '<!-- END-OF-PUBLICATIONS -->' --replace update.block``
75155

76-
### Fingerprint-SSH-Keys
156+
# πŸ“š Fingerprint-SSH-Keys
77157

78158
Fingerprint-SSH-Keys prints the SSH key fingerprints of the local machine in different formats: SSH hash, DNS SSHFP RR, or Python dictionary. Its typical usage is straightforward:
79159

80-
``Fingerprint-SSH-Keys``
160+
<pre>
161+
Fingerprint-SSH-Keys
162+
</pre>
81163

82-
### Configure-Grub
164+
165+
# πŸ“š Configure-Grub
83166

84167
Configure-Grub adjusts a GRUB configuration file by applying a configuration from a template, and merging the existing configurations settings with additional customisations. It can for example be used to set a custom screen resolution (GRUB_GFXMODE option) or startup tune (GRUB_INIT_TUNE option). The [VM Image Builder Scripts](https://github.com/simula/nornet-vmimage-builder-scripts) use Configure-Grub to configure the screen resolution and a boot splash image.
85168

86-
### Try-Hard
169+
170+
# πŸ“š Try-Hard
87171

88172
Try-Hard runs a command and retries for a given number of times in case of error, with a delay between the trials.
89173

90174
Example to try a file download up to 3&nbsp;times, with a delay of 60&nbsp;seconds between trials:
91175

92-
``try-hard 3 60 -- wget -O example.tar.gz https://www.example.net/example.tar.gz``
176+
<pre>
177+
try-hard 3 60 -- wget -O example.tar.gz https://www.example.net/example.tar.gz
178+
</pre>
93179

94-
### Random-Sleep
180+
181+
# πŸ“š Random-Sleep
95182

96183
Random-Sleep waits for a random time, selected from a given interval, with support for fractional seconds.
97184

98185
Example to wait between 0.5&nbsp;and 299.5&nbsp;seconds:
99186

100-
``random-sleep 0.5 299.5 &amp;&amp; echo "Finished waiting!"``
187+
<pre>
188+
random-sleep 0.5 299.5 &amp;&amp; echo "Finished waiting!"
189+
</pre>
190+
101191

102-
## Binary Package Installation
192+
# πŸ“¦ Binary Package Installation
103193

104194
Please use the issue tracker at [https://github.com/dreibh/system-tools/issues](https://github.com/dreibh/system-tools/issues) to report bugs and issues!
105195

106-
### Ubuntu Linux
196+
## Ubuntu Linux
107197

108-
For ready-to-install Ubuntu Linux packages of System-Tools, see Launchpad PPA for Thomas Dreibholz!
198+
For ready-to-install Ubuntu Linux packages of System-Tools, see [Launchpad PPA for Thomas Dreibholz](https://launchpad.net/~dreibh/+archive/ubuntu/ppa/+packages?field.name_filter=system-tools&field.status_filter=published&field.series_filter=)!
109199

110-
```
200+
<pre>
111201
sudo apt-add-repository -sy ppa:dreibh/ppa
112202
sudo apt-get update
113-
sudo apt-get install td-system-tools
114-
```
203+
sudo apt-get install system-tools
204+
</pre>
115205

116-
### Fedora Linux
206+
## Fedora Linux
117207

118-
For ready-to-install Fedora Linux packages of System-Tools, see COPR PPA for Thomas Dreibholz!
208+
For ready-to-install Fedora Linux packages of System-Tools, see [COPR PPA for Thomas Dreibholz](https://copr.fedorainfracloud.org/coprs/dreibh/ppa/package/system-tools/)!
119209

120-
```
210+
<pre>
121211
sudo dnf copr enable -y dreibh/ppa
122-
sudo dnf install td-system-tools
123-
```
212+
sudo dnf install system-tools
213+
</pre>
124214

125-
### FreeBSD
215+
## FreeBSD
126216

127-
For ready-to-install FreeBSD packages of System-Tools, it is included in the ports collection, see [FreeBSD ports tree index of net/td-system-tools/](https://cgit.freebsd.org/ports/tree/net/td-system-tools/)!
217+
For ready-to-install FreeBSD packages of System-Tools, it is included in the ports collection, see [FreeBSD ports tree index of net/system-tools/](https://cgit.freebsd.org/ports/tree/net/system-tools/)!
128218

129-
pkg install td-system-tools
219+
<pre>
220+
pkg install system-tools
221+
</pre>
130222

131223
Alternatively, to compile it from the ports sources:
132224

133-
```
134-
cd /usr/ports/net/td-system-tools
225+
<pre>
226+
cd /usr/ports/net/system-tools
135227
make
136228
make install
137-
```
229+
</pre>
138230

139-
## Sources Download
140231

141-
System-Tools is released under the GNU General Public Licence (GPL).
232+
# πŸ’Ύ Build from Sources
233+
234+
System-Tools is released under the [GNU General Public Licence&nbsp;(GPL)](https://www.gnu.org/licenses/gpl-3.0.en.html#license-text).
142235

143236
Please use the issue tracker at [https://github.com/dreibh/system-tools/issues](https://github.com/dreibh/system-tools/issues) to report bugs and issues!
144237

145-
### Development Version
238+
## Development Version
146239

147240
The Git repository of the System-Tools sources can be found at [https://github.com/dreibh/system-tools](https://github.com/dreibh/system-tools):
148241

149-
```
242+
<pre>
150243
git clone https://github.com/dreibh/system-tools
151244
cd system-tools
152245
cmake .
153246
make
154-
```
247+
</pre>
155248

156249
Contributions:
157250

158-
- Issue tracker: [https://github.com/dreibh/system-tools/issues](https://github.com/dreibh/system-tools/issues).
251+
* Issue tracker: [https://github.com/dreibh/system-tools/issues](https://github.com/dreibh/system-tools/issues).
159252
Please submit bug reports, issues, questions, etc. in the issue tracker!
160253

161-
- Pull Requests for System-Tools: [https://github.com/dreibh/system-tools/pulls](https://github.com/dreibh/system-tools/pulls).
254+
* Pull Requests for System-Tools: [https://github.com/dreibh/system-tools/pulls](https://github.com/dreibh/system-tools/pulls).
162255
Your contributions to System-Tools are always welcome!
163256

164-
- CI build tests of System-Tools: [https://github.com/dreibh/system-tools/actions](https://github.com/dreibh/system-tools/actions).
257+
* CI build tests of System-Tools: [https://github.com/dreibh/system-tools/actions](https://github.com/dreibh/system-tools/actions).
258+
259+
## Release Versions
260+
261+
See [https://www.nntb.no/~dreibh/system-tools/#current-stable-release](https://www.nntb.no/~dreibh/system-tools/#current-stable-release) for the release packages!
165262

166-
- Coverity Scan analysis of System-Tools: [https://scan.coverity.com/projects/dreibh-td-system-tools](https://scan.coverity.com/projects/dreibh-td-system-tools).
167263

168-
### Current Stable Release
264+
# πŸ”— Useful Links
169265

170-
See [https://www.nntb.no/~dreibh/system-tools/#StableRelease](https://www.nntb.no/~dreibh/system-tools/#StableRelease)!
266+
* [NetPerfMeter – A TCP/MPTCP/UDP/SCTP/DCCP Network Performance Meter Tool](https://www.nntb.no/~dreibh/netperfmeter/index.html)
267+
* [HiPerConTracer – High-Performance Connectivity Tracer](https://www.nntb.no/~dreibh/hipercontracer/index.html)

β€Žsrc/Print-UTF8/figures/guru.webp

45.4 KB
Binary file not shown.
115 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
101 KB
Binary file not shown.
97.1 KB
Binary file not shown.
85.4 KB
Binary file not shown.

0 commit comments

Comments
Β (0)