-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathview_log.sh
More file actions
executable file
·30 lines (27 loc) · 871 Bytes
/
view_log.sh
File metadata and controls
executable file
·30 lines (27 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
#This accesses the log file for various services
echo "Access logs for $service"
echo "Read old logs, new logs, or live feed (old / new/ live)"
read ans
case "$ans" in
new)
echo "This access the logs for the monero NVIDIA miner"
echo "How many lines of log do you want to see? (20 is usually good)"
read lines
sudo tail -n $lines /var/log/upstart/mos$service.log
;;
old)
echo "This accesses older logs for the monero NVIDIA miner"
echo "How many lines of log do you want to see? (20 is usually good)"
read lines
echo "How old of a file do you want to see? 1 = newest, 7 = oldest"
read old
sudo zcat /var/log/upstart/mos_$service.log.$old.gz | tail -n $lines
;;
live)
echo "#############################"
echo -e "\033[33;5;7mREMEMBER TO EXIT USING CTRL-C\033[0m"
echo "#############################"
sudo tail -f /var/log/upstart/mos_$service.log
;;
esac