-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathonelog
executable file
·79 lines (76 loc) · 1.8 KB
/
onelog
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
if [ "$1" = "--tail" -o "$1" == "-f" ]; then
shift
PAGER="tail -f"
else
PAGER=${PAGER:-less}
fi
if [ -n "$ONE_LOCATION" ]; then
if [ -n "$1" ]; then
case "$1" in
econe)
$PAGER $ONE_LOCATION/var/econe-server.log
;;
econe.error)
$PAGER $ONE_LOCATION/var/econe-server.error
;;
sunstone)
$PAGER $ONE_LOCATION/var/sunstone.log
;;
sunstone.error)
$PAGER $ONE_LOCATION/var/sunstone.error
;;
sched)
$PAGER $ONE_LOCATION/var/sched.log
;;
monitor)
$PAGER $ONE_LOCATION/var/monitor.log
;;
fireedge)
$PAGER $ONE_LOCATION/var/fireedge.log
;;
fireedgerr)
$PAGER $ONE_LOCATION/var/fireedge.error
;;
*)
$PAGER $ONE_LOCATION/var/vms/$1/vm.log
;;
esac
else
$PAGER $ONE_LOCATION/var/oned.log
fi
else
if [ -n "$1" ]; then
case "$1" in
econe)
$PAGER /var/log/one/econe-server.log
;;
econe.error)
$PAGER /var/log/one/econe-server.error
;;
sunstone)
$PAGER /var/log/one/sunstone.log
;;
sunstone.error)
$PAGER /var/log/one/sunstone.error
;;
sched)
$PAGER /var/log/one/sched.log
;;
monitor)
$PAGER /var/log/one/monitor.log
;;
fireedge)
$PAGER /var/log/one/fireedge.log
;;
fireedgerr)
$PAGER /var/log/one/fireedge.err
;;
*)
$PAGER /var/log/one/$1.log
;;
esac
else
$PAGER /var/log/one/oned.log
fi
fi