forked from tinova/one-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonelog
executable file
·105 lines (103 loc) · 2.72 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
PAGER=${PAGER:-less}
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
;;
occi)
$PAGER $ONE_LOCATION/var/occi-server.log
;;
occi.error)
$PAGER $ONE_LOCATION/var/occi-server.error
;;
ozones)
$PAGER $ONE_LOCATION/var/ozones-server.log
;;
ozones.error)
$PAGER $ONE_LOCATION/var/ozones-server.error
;;
appflow)
if [ -n "$2" ]; then
$PAGER $ONE_LOCATION/var/appflow/$2.log
else
$PAGER $ONE_LOCATION/var/appflow-server.log
fi
;;
appflow.error)
$PAGER $ONE_LOCATION/var/appflow-server.error
;;
appmarket)
$PAGER $ONE_LOCATION/var/appmarket-server.log
;;
appmarket.error)
$PAGER $ONE_LOCATION/var/appmarket-server.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
;;
occi)
$PAGER /var/log/one/occi-server.log
;;
occi.error)
$PAGER /var/log/one/occi-server.error
;;
ozones)
$PAGER /var/log/one/ozones-server.log
;;
ozones.error)
$PAGER /var/log/one/ozones-server.error
;;
appflow)
if [ -n "$2" ]; then
$PAGER /var/log/one/appflow/$2.log
else
$PAGER /var/log/one/appflow-server.log
fi
;;
appflow.error)
$PAGER /var/log/one/appflow-server.error
;;
appmarket)
$PAGER /var/log/one/appmarket-server.log
;;
appmarket.error)
$PAGER /var/log/one/appmarket-server.error
;;
*)
$PAGER /var/log/one/$1.log
;;
esac
else
$PAGER /var/log/one/oned.log
fi
fi