-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathnotes.txt
208 lines (171 loc) · 6.79 KB
/
notes.txt
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
------------------------------------------------------------------------
I believe it is important to show that we have a really good
documentation in the man pages:
# man s9s-node
# man s9s-cluster
------------------------------------------------------------------------
List a few specific nodes from one specific cluster:
# s9s node \
--list \
--long \
--cluster-name=ft_postgresql_36945 \
'*168.0*' '10.10*'
------------------------------------------------------------------------
The following example shows how the cluster format string can be used
to print a customized the cluster list. The --cluster-format command
line option is used here to produce a multi-line output:
# s9s cluster \
--list \
--cluster-format=" ID : %05I \nStatus : %S \n Name : %N\n Type : %T\n Owner : %O/%G\n\n"
ID : 00001
Status : STOPPED
Name : ft_postgresqlstop_48273
Type : POSTGRESQL_SINGLE
Owner : pipas/users
------------------------------------------------------------------------
Create a set of graphs, one for each node shown in the terminal about
the load on the hosts. If the terminal is wide enough the graphs will
be shown side by side for a compact view.
# s9s node \
--stat \
--cluster-id=1 \
--begin="08:00" \
--end="14:00" \
--graph=load
------------------------------------------------------------------------
Density functions can also be printed to show what were the typical
values for the given statistical data. The following example shows what
was the typical values for the user mode CPU usage percent
# s9s node \
--stat \
--cluster-id=2 \
--begin=00:00 \
--end=16:00 \
--density \
--graph=cpuuser
------------------------------------------------------------------------
The following example shows how a node in a given cluster can be
restarted. When this command executed a new job will be created to
restart a node. The command line tool will stop and show the job mes‐
sages until the job is finished.
# s9s node \
--restart \
--cluster-id=1 \
--nodes=192.168.1.117 \
--log
------------------------------------------------------------------------
The following example shows how a custom list can be created to show
some information about the CPU(s) in some specific hosts:
# s9s node \
--list \
--node-format="%N %U CPU %c Cores %6.2u%% %Z\n" \
192.168.1.191 \
192.168.1.195
192.168.1.191 2 CPU 16 Cores 22.54% Intel(R) Xeon(R) CPU L5520 @ 2.27GHz
192.168.1.195 2 CPU 16 Cores 23.12% Intel(R) Xeon(R) CPU L5520 @ 2.27GHz
------------------------------------------------------------------------
The following list shows some information about the memory, the total
memory and the memory available for the applications to allocate
(including cache and buffer with the free memory):
# s9s node \
--list \
--node-format="%4.2m GBytes %4.2fm GBytes %N\n"
16.00 GBytes 15.53 GBytes 192.168.1.191
47.16 GBytes 38.83 GBytes 192.168.1.127
------------------------------------------------------------------------
Here is a reminder about how I run the tests on the servers. This shoul
be more automatic though.
This is pretty automatic, but it has to be started manually:
pipas@www:~$ pip-test-daemon --continuous
Starting a test that was not executed before is kinda complicated:
pipas@www:/var/www/html/ft_install$ cd /var/www/html/ft_install/
pipas@www:/var/www/html/ft_install$ ./schedule_test.sh --s9s ft_proxysql_os.sh
------------------------------------------------------------------------
s9s server --create --servers="lxc://storage01?hostgrouppath=myservers"
s9s server --create --servers="lxc://core1?hostgrouppath=myservers"
s9s node --set --nodes=core1 --properties="hostgrouppath=myservers"
TIMEZONE FOR CMNDB CREATED USER
{
"class_name": "CmonUser",
"cdt_path": "/",
"owner_user_id": 1,
"owner_user_name": "system",
"owner_group_id": 1,
"owner_group_name": "admins",
"acl": "user::rwx,group::r--,other::r--",
"created": "2021-03-18T09:46:36.529Z",
"disabled": false,
"effective_privileges": "r--",
"first_name": "System",
"last_failed_login": "",
"last_login": "2021-03-18T09:47:49.553Z",
"last_name": "User",
"n_failed_logins": 0,
"origin": "CmonDb",
"suspended": false,
"user_id": 1,
"user_name": "system",
"groups": [ {
"class_name": "CmonGroup",
"cdt_path": "/groups",
"owner_user_id": 1,
"owner_user_name": "system",
"owner_group_id": 1,
"owner_group_name": "admins",
"acl": "user::rwx,group::rwx,other::---",
"created": "2021-03-18T09:46:36.514Z",
"group_id": 1,
"group_name": "admins"
} ],
"timezone": {
"class_name": "CmonTimeZone",
"name": "Central European Time",
"abbreviation": "CET",
"offset": -3600,
"use_dst": false
}
},
{
"class_name": "CmonUser",
"cdt_path": "/",
"owner_user_id": 5,
"owner_user_name": "username",
"owner_group_id": 1,
"owner_group_name": "admins",
"acl": "user::rwx,group::r--,other::r--",
"created": "2021-03-18T09:47:51.072Z",
"disabled": false,
"distinguished_name": "cn=username,dc=homelab,dc=local",
"effective_privileges": "r--",
"email_address": "[email protected]",
"first_name": "firstname",
"last_failed_login": "",
"last_login": "2021-03-18T09:47:51.171Z",
"last_name": "lastname",
"n_failed_logins": 0,
"origin": "LDAP",
"suspended": false,
"user_id": 5,
"user_name": "username",
"groups": [ {
"class_name": "CmonGroup",
"cdt_path": "/groups",
"owner_user_id": 1,
"owner_user_name": "system",
"owner_group_id": 1,
"owner_group_name": "admins",
"acl": "user::rwx,group::rwx,other::---",
"created": "2021-03-18T09:47:50.461Z",
"group_id": 5,
"group_name": "ldapgroup"
} ],
"timezone": {
"class_name": "CmonTimeZone",
"name": "Central European Time",
"abbreviation": "CET",
"offset": -3600,
"use_dst": true
}
}
]
}