Created
June 21, 2018 00:25
-
-
Save danmack/e6f82194b34e6cd8e6112fa8c6059a2a to your computer and use it in GitHub Desktop.
sm-summary fails on minimal-64 image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sm-summary fails with an error using the latest 2018-04-08 smartos-image | |
# error is: | |
[root@6e08a13d-1eb6-c5d6-c2ee-fea3793af583 ~]# sm-summary | |
* Gathering VM instance summary.. | |
df: unknown option: B | |
Usage: df [-F FSType] [-abeghklmntPVvZ] [-o FSType-specific_options] [directory | block_device | resource] | |
[root@6e08a13d-1eb6-c5d6-c2ee-fea3793af583 ~]# grep df `which sm-summary` | |
vm_tmpused=$(df -B1 /tmp | awk '{ if ($1 ~ /swap/) printf("%d", $3/1024/1024) }'); | |
[root@devtron ~]# imgadm avail | head -1 ; imgadm avail |grep minimal-64 | tail -3 | |
UUID NAME VERSION OS TYPE PUB | |
03fba0ca-acff-11e7-9ec6-07009fb6ab46 minimal-64 17.3.0 smartos zone-dataset 2017-10-09 | |
62aaa296-f143-11e7-bd81-9be1bda071f7 minimal-64-lts 17.4.0 smartos zone-dataset 2018-01-04 | |
a9403aca-3b82-11e8-bc18-b30e5416d79b minimal-64 18.1.0 smartos zone-dataset 2018-04-08 | |
[root@devtron ~]# vmadm list | |
UUID TYPE RAM STATE ALIAS | |
6e08a13d-1eb6-c5d6-c2ee-fea3793af583 OS 256 running min64 | |
[root@devtron ~]# vmadm get 6e08a13d-1eb6-c5d6-c2ee-fea3793af583 | grep image_uuid | |
"image_uuid": "a9403aca-3b82-11e8-bc18-b30e5416d79b", | |
# ah, df on minimal-64 is different than df on base-64 (/opt/local/bin/df (GNU df)) | |
# minimal-64 has this /usr/sbin/df only: | |
DF(1M) Maintenance Commands DF(1M) | |
NAME | |
df - displays number of free disk blocks and free files | |
SYNOPSIS | |
/usr/bin/df [-F FSType] [-abeghklmnPtVvZ] | |
[-o FSType-specific_options] | |
[block_device | directory | file | resource ...] | |
# Not sure if this ever worked or not, where in the smartos source does sm-summary live? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment