The following options are automatically added to every Scrippy script. Their names are reserved: Declaring an option with one of these names with @args is an error.
| Option | Purpose |
|---|---|
-h, --help |
Display the help and exit |
--version |
Display the version and exit |
--source-code |
Display the source code and exit |
--hist [NB_EXECUTION] |
Display the execution history and exit |
--log [SESSION] |
Display a log file and exit |
--debug |
Force the log level to DEBUG |
--no-stdout |
Disable the terminal output, except for errors |
--no-log-file |
Disable the log file and the history |
The options that display something (--help, --version, --source-code, --hist, --log) exit right after, without entering the execution context: The script code is not run and the execution is not recorded in the history.
--helpDisplays the usage of the script, the @author, @date, @version and @description declarations of the header and the help of every option.
usage: disk_watch.py [-h] [--version] [--source-code]
[--hist [NB_EXECUTION (default:10)]]
[--log [SESSION (default: last)]] [--debug] [--no-stdout]
[--no-log-file]
[--mount-point MOUNT_POINT [MOUNT_POINT ...]]
[--exclude EXCLUDE [EXCLUDE ...]] [--warning WARNING]
[--critical CRITICAL] [--token TOKEN] [--report]
[--format {text,csv}]
Author: Luiggi Vercotti
Date: 2026-10-08
Version: 1.0.0
Description: Monitor filesystem usage
options:
-h, --help show this help message and exit
[...]
--versionDisplays the script name and its @version declaration.
disk_watch.py 1.0.0
--source-codeDisplays the source code of the script, with line numbers and syntax highlighting.
--hist--hist [NB_EXECUTION]
Displays the last NB_EXECUTION executions recorded in the history (10 by default), from the most recent to the oldest.
| Column | Content |
|---|---|
Session |
The session identifier, to be used with --log |
Start |
The start date of the execution (DD/MM/YYYY HH:MM:SS) |
End |
The end date of the execution (None while running or if killed) |
Duration |
The duration of the execution |
Origin |
The user who initiated the execution (the original user in case of sudo) |
Exec |
The user who actually ran the script |
Code |
The exit status |
Params |
The options and arguments passed to the script, secret values redacted |
Exit |
The name of the error if the execution did not end correctly, 0 otherwise |
Nothing is displayed after the title line if the script has never been run.
--log--log [SESSION]
Displays the log file of the execution whose session identifier is SESSION, or of the last recorded execution when SESSION is omitted.
| Error | Cause | Exit status |
|---|---|---|
No session found in execution history |
--log without SESSION and an empty history |
1 |
No log file found for session <SESSION> |
No log file for this session (unknown session, or log file deleted) | 1 |
--debugForces the log level to DEBUG:
logger.debug() messages are displayed and logged.@conf is displayed during the configuration check, secret values being redacted.Warning: The DEBUG level may display information that could be a source of information leakage. It should not be used in production.
--no-stdoutDisables the output to the terminal for all messages but the ERROR and CRITICAL ones. The log file is not affected.
--no-log-fileDisables the log file and the recording of the execution in the history. The terminal output is not affected. The following warning is logged:
[WARNING ] [+] Option --no-log-file is set -> This session will not be logged nor recorded into history
--debug, --no-stdout and --no-log-file can be combined, and can be referenced in the conflicts and implies fields of an @args declaration.