Manta Operator's Guide:
https://tritondatacenter.github.io/manta
manta-adm show, manta-adm cnmanta-login, manta-oneachmlive, manta-adm alarmmlocatemoray(1) suitemrjob, mrzones, mrgroupspgsqlstatmanta-adm show [SERVICE]: show zonesmanta-adm show -s: count zones by shard, versionmanta-adm cn: show CNs[root@headnode (staging-1) ~]# manta-adm show
SERVICE SH ZONENAME GZ ADMIN IP
authcache 1 51ae8301-fefa-4922-9c48-93226acec1a5 172.25.3.38
electric-moray 1 2a689e6c-e12a-4c62-bc7c-72b7efab7eea 172.25.3.38
jobpuller 1 9d1ffdcd-a283-4835-8cb0-20c2fa77c134 172.25.3.38
jobsupervisor 1 2b1d10be-6d68-4fe8-91e5-688aeae0cae9 172.25.3.38
loadbalancer 1 49a3d111-c7a3-478a-9d9c-8ec85a0f64da 172.25.3.38
...
moray 1 b3c6c144-7500-4904-a0b5-91997a71f75d 172.25.3.38
moray 2 b68396db-d49f-487a-8379-a36234ac9993 172.25.3.38
moray 3 69790d4a-d500-4e56-99ac-967024765805 172.25.3.38
nameservice 1 c6bfb16d-1c43-4fff-95be-5603870dd822 172.25.3.38
...[root@headnode (staging-1) ~]# manta-adm show postgres
SERVICE SH ZONENAME GZ ADMIN IP
postgres 1 70d44638-f4fb-4cbd-8611-0f7c83d8502f 172.25.3.38
postgres 2 a5223321-600b-43eb-b66d-ebc0ab500046 172.25.3.38
postgres 3 ef318383-c5fb-4381-8416-a1636d8efa95 172.25.3.38[root@headnode (staging-1) ~]# manta-adm show \
-o gz_admin_ip,service,zonename,primary_ip storage
GZ ADMIN IP SERVICE ZONENAME PRIMARY IP
172.25.3.39 storage f7954cad-7e23-434f-be98-f077ca7bc4c0 172.27.3.14manta-adm help show for a list of fields you can pass to -o.[root@headnode (staging-1) ~]# manta-adm show -a
SERVICE SH DATACENTER ZONENAME
authcache 1 staging-1 51ae8301-fefa-4922-9c48-93226acec1a5
authcache 1 staging-2 8d01425c-a7d7-4373-9c05-c46b0a567ab9
authcache 1 staging-3 46ebba2d-820f-4331-ad25-37062192e68c
electric-moray 1 staging-1 2a689e6c-e12a-4c62-bc7c-72b7efab7eea
electric-moray 1 staging-2 56533ef1-f79e-4406-9d2a-0b72fb2d2394
electric-moray 1 staging-3 b6f4ec17-f7ea-4c38-b741-de88e992c5d3
...[root@headnode (staging-1) ~]# manta-adm show -c
CN RA10146 445aab6c-3048-11e3-9816-002590c3f3bc 172.25.3.39
SERVICE SH ZONENAME
marlin 1 0474da9a-21cd-4eba-a0c2-c353a14b2fbd
...
storage 1 f7954cad-7e23-434f-be98-f077ca7bc4c0
CN RA14872 aac3c402-3047-11e3-b451-002590c57864 172.25.3.38
SERVICE SH ZONENAME
authcache 1 51ae8301-fefa-4922-9c48-93226acec1a5
electric-moray 1 2a689e6c-e12a-4c62-bc7c-72b7efab7eea
jobpuller 1 9d1ffdcd-a283-4835-8cb0-20c2fa77c134
jobsupervisor 1 2b1d10be-6d68-4fe8-91e5-688aeae0cae9
...[root@headnode (staging-1) ~]# manta-adm show -s
SERVICE SH VERSION COUNT
authcache 1 master-20171201T230631Z-gf5ad52f 1
electric-moray 1 master-20180118T080706Z-g27c91ec 1
jobpuller 1 master-20170920T001026Z-g95b5f73 1
jobsupervisor 1 master-20170919T234226Z-gb8af6a8 1
loadbalancer 1 master-20180111T211740Z-ga9c40a1 1
marlin 1 master/13.3.6 32
medusa 1 master-20170919T234916Z-g7b01c12 1
moray 1 master-20180118T075404Z-g76db9a2 1
moray 2 master-20180118T075404Z-g76db9a2 1
moray 3 master-20180118T075404Z-g76db9a2 1
nameservice 1 master-20171215T001927Z-g5958142 1
...[root@headnode (staging-1) ~]# manta-adm show -o zonename,storage_id storage
ZONENAME STORAGE ID
f7954cad-7e23-434f-be98-f077ca7bc4c0 1.stor.staging.joyent.us[root@headnode (staging-1) ~]# manta-adm show -a -o zonename,storage_id storage
ZONENAME STORAGE ID
f7954cad-7e23-434f-be98-f077ca7bc4c0 1.stor.staging.joyent.us
12fa9eea-ba7a-4d55-abd9-d32c64ae1965 2.stor.staging.joyent.us
6dbfb615-b1ac-4f9a-8006-2cb45b87e4cb 3.stor.staging.joyent.usmanta-adm cnShow various information about servers.
[root@headnode (staging-1) ~]# manta-adm cn
DC HOST ADMIN IP KIND
staging-1 RA14872 172.25.3.38 other
staging-1 RA10146 172.25.3.39 storageSee also: -o option for specific fields
[root@headnode (staging-1) ~]# manta-adm cn -o host,compute_id
HOST COMPUTE ID
RA14872 -
RA10146 1.cn.staging.joyent.us[root@headnode (staging-1) ~]# manta-adm cn -o host,storage_ids
HOST STORAGE IDS
RA14872 -
RA10146 1.stor.staging.joyent.usstorage_ids, not storage_id. There may be more than one!
(Generally only in dev.)manta-adm alarmmanta-adm alarmman manta-admmanta-loginmanta-login 586053f4-bd49-44bf-bf3e-56436bc0a0cessh and zlogin).manta-login SERVICE [WHICH]manta-login jobsupervisormanta-login postgres 0manta-login numberingmanta-login options numbered from 0:[root@headnode (staging-1) ~]# manta-login postgres
0: postgres 1 70d44638-f4fb-4cbd-8611-0f7c83d8502f 172.25.3.38
1: postgres 2 a5223321-600b-43eb-b66d-ebc0ab500046 172.25.3.38
2: postgres 3 ef318383-c5fb-4381-8416-a1636d8efa95 172.25.3.38
Choose a number:manta-login matching[root@headnode (staging-1) ~]# manta-login moray
0: electric-moray 1 2a689e6c-e12a-4c62-bc7c-72b7efab7eea 172.25.3.38
1: moray 1 b3c6c144-7500-4904-a0b5-91997a71f75d 172.25.3.38
2: moray 2 b68396db-d49f-487a-8379-a36234ac9993 172.25.3.38
3: moray 3 69790d4a-d500-4e56-99ac-967024765805 172.25.3.38
Choose a number:manta-login -GWith -G, opens a shell in the global zone of the server hosting the matching
zone.
Useful for looking at system-wide stats and DTrace probes.
Log into the GZ of the shard 1 postgres:
manta-login -G postgres 0man manta-loginmanta-oneachmanta-login is great for test systems and making one-off observations and
tweaksmanta-oneach is needed for ad hoc changes or data
collectionmanta-oneach is a very sharp tool!
(See: accidental whole-datacenter reboot.)
https://www.tritondatacenter.com/blog/postmortem-for-outage-of-us-east-1-may-27-2014
[root@headnode (emy-10) ~]# manta-oneach -s jobsupervisor \
'svcadm restart jobsupervisor'
SERVICE ZONE OUTPUT
jobsupervisor 2a74b4a2
jobsupervisor d8800db3[root@headnode (emy-10) ~]# manta-oneach -G -s storage \
'svcadm restart marlin-agent'
HOSTNAME OUTPUT
headnode-N[root@headnode (emy-10) ~]# manta-oneach -s webapi \
'tail -n 100 /var/log/muskie.log | grep -c "handled: 5"'
SERVICE ZONE OUTPUT
webapi 1aab0a8f 0
webapi 2004385c 0[root@headnode (staging-1) ~]# manta-oneach -s postgres \
-N 'zfs list -o used'
SERVICE ZONE OUTPUT
postgres 70d44638 8.27G
postgres a5223321 11.5G
postgres ef318383 11.5G-H to skip the header row[root@headnode (emy-10) ~]# manta-oneach -s loadbalancer \
'svcs -H haproxy'
SERVICE ZONE OUTPUT
loadbalancer 4409d3c7 online Nov_25 svc:/manta/haproxy:default
loadbalancer d5d07015 online Nov_19 svc:/manta/haproxy:default-o to select columns[root@headnode (emy-10) ~]# manta-oneach -s loadbalancer \
'svcs -H -o state haproxy'
SERVICE ZONE OUTPUT
loadbalancer 4409d3c7 online
loadbalancer d5d07015 onlinemanta-oneach -s postgres -d /root -g $PWD/trace_10s.d
manta-oneach -s postgres 'chmod +x /root/trace_10s.d'manta-oneach -s postgres '/root/trace_10s.d`manta-oneach -s postgres -d $PWD -p /var/tmp/data.out--concurrency=N-I to get results immediately.Restart loadbalancers a few seconds apart:
manta-oneach -I --concurrency=1 -s loadbalancer \
'sleep 5; date; svcadm restart haproxy'-T NSECONDS —
especially useful when a server is down).MANTA-1234.d)manta-oneach ... 'pkill MANTA-1234.d'manta-oneach improvements--shard:manta-oneach -s postgres --shard=14 'manatee-adm show'manta-oneach --manatee-role=primary \
'pgrep -U postgres | wc -l'-G that invokes the command once for each matching instance,
providing zonename — e.g.,manta-oneach -G --for-each \
-s storage 'vmadm get $ZONENAME`manta-login improvementsmanta-oneach has: --serviceman manta-loginmlive-s N to specify number of shards (used — dubiously — to try
to create enough different directories to hit every shard)-S to skip re-creating the whole directory treemlocatemlocate outputmrjobmoray toolspgsqlstatmoraystat.dsvcs(1) (SMF services)proc(1) ("ptools")netstat(1) (net connections)netstat(1) -s (net stats)zonememstat(1M) (memory limits)vfsstat(1M) (filesystem ops)prstat(1M) (process activity)mpstat(1M) (CPU activity)iostat(1M) (disk activity)dtrace(1M)mdb(1M), mdb_v8grep -c to just report a countcut or awk syntax to pull out specific fieldssort options (sort by various columns, numeric sort, --debug on GNU)sort | uniq -c: frequency count, sorted by valuesort | uniq -c | sort -n: frequency count, sorted by countpbcopy, pbpastejson(1), bunyan(1)