Lines Matching +full:tmon +full:- +full:mask

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * tmon.c Thermal Monitor (TMON) main function and entry point
28 #include "tmon.h"
51 printf("Usage: tmon [OPTION...]\n"); in usage()
52 printf(" -c, --control cooling device in control\n"); in usage()
53 printf(" -d, --daemon run as daemon, no TUI\n"); in usage()
54 printf(" -g, --debug debug message in syslog\n"); in usage()
55 printf(" -h, --help show this help message\n"); in usage()
56 printf(" -l, --log log data to /var/tmp/tmon.log\n"); in usage()
57 printf(" -t, --time-interval sampling time interval, > 1 sec.\n"); in usage()
58 printf(" -T, --target-temp initial target temperature\n"); in usage()
59 printf(" -v, --version show version\n"); in usage()
60 printf(" -z, --zone target thermal zone id\n"); in usage()
67 printf("TMON version %s\n", VERSION); in version()
73 syslog(LOG_INFO, "TMON exit cleanup\n"); in tmon_cleanup()
100 syslog(LOG_INFO, "TMON caught signal %d\n", sig); in tmon_sig_handler()
112 printf("ctrl-c, exit and clean up\n"); in tmon_sig_handler()
127 openlog("tmon.log", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL0); in start_syslog()
128 syslog(LOG_NOTICE, "TMON started by User %d", getuid()); in start_syslog()
167 fprintf(tmon_log, "#----------- THERMAL SYSTEM CONFIG -------------\n"); in prepare_logging()
192 fprintf(tmon_log, "#---------- THERMAL DATA LOG STARTED -----------\n"); in prepare_logging()
208 { "time-interval", 1, NULL, 't' },
209 { "target-temp", 1, NULL, 'T' },
225 printf("TMON needs to be run as root\n"); in main()
229 while ((c = getopt_long(argc, argv, "c:dlht:T:vgz:", opts, &id2)) != -1) { in main()
237 printf("Run TMON in daemon mode\n"); in main()
253 printf("Logging data to /var/tmp/tmon.log\n"); in main()
285 return -1; in main()
351 /* change the file mode mask */ in start_daemon_mode()