{"action":"created","issue":{"url":"https://api.github.com/repos/iocage/iocage/issues/336","repository_url":"https://api.github.com/repos/iocage/iocage","labels_url":"https://api.github.com/repos/iocage/iocage/issues/336/labels{/name}","comments_url":"https://api.github.com/repos/iocage/iocage/issues/336/comments","events_url":"https://api.github.com/repos/iocage/iocage/issues/336/events","html_url":"https://github.com/iocage/iocage/issues/336","id":133730302,"number":336,"title":"\"[: -gt: unexpected operator\" in inuse operation when jails are stopped","user":{"login":"olgeni","id":412031,"avatar_url":"https://avatars.githubusercontent.com/u/412031?v=3","gravatar_id":"","url":"https://api.github.com/users/olgeni","html_url":"https://github.com/olgeni","followers_url":"https://api.github.com/users/olgeni/followers","following_url":"https://api.github.com/users/olgeni/following{/other_user}","gists_url":"https://api.github.com/users/olgeni/gists{/gist_id}","starred_url":"https://api.github.com/users/olgeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olgeni/subscriptions","organizations_url":"https://api.github.com/users/olgeni/orgs","repos_url":"https://api.github.com/users/olgeni/repos","events_url":"https://api.github.com/users/olgeni/events{/privacy}","received_events_url":"https://api.github.com/users/olgeni/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/iocage/iocage/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-15T14:47:53Z","updated_at":"2016-02-16T05:58:51Z","closed_at":"2016-02-15T23:19:32Z","body":"Something weird is going on with the \"inuse\" operation.\r\n\r\n    # iocage version\r\n    iocage DEVELOP (2016-02-05)\r\n\r\nBut it is the same on today's develop branch.\r\n\r\nI have some jails running:\r\n\r\n    # iocage list \r\n    JID  UUID                                  BOOT  STATE  TAG     TYPE       IP4\r\n    5    608d1dc1-cffd-11e5-9a8d-080027af0e2a  off   up     pgsql   emptyjail  172.20.0.1\r\n    4    853c5a30-cffe-11e5-9a8d-080027af0e2a  off   up     redis   emptyjail  172.20.0.2\r\n    3    b6011e03-d3eb-11e5-906e-080027af0e2a  off   up     kibana  emptyjail  172.20.0.3\r\n\r\nAnd inuse works fine:\r\n\r\n    # iocage inuse\r\n    UUID,TAG,cputime,datasize,stacksize,coredumpsize,memoryuse,memorylocked,maxproc,openfiles,vmemoryuse,pseudoterminals,swapuse,nthr,msgqqueued,msgqsize,nmsgq,nsem,nsemop,nshm,shmsize,wallclock,pcpu\r\n    608d1dc1-cffd-11e5-9a8d-080027af0e2a,pgsql,0,56K,264K,0,8380K,0,2,80,74M,0,0,2,0,0,0,0,0,0,0,387,0\r\n    853c5a30-cffe-11e5-9a8d-080027af0e2a,redis,0,56K,264K,0,8388K,0,2,80,74M,0,0,2,0,0,0,0,0,0,0,412,0\r\n    b6011e03-d3eb-11e5-906e-080027af0e2a,kibana,2653,828K,8840K,0,363M,0,17,896,3678M,1,21G,72,0,0,0,0,0,0,0,32K,0\r\n\r\nI stop one jail:\r\n\r\n    # iocage stop kibana\r\n    * Stopping b6011e03-d3eb-11e5-906e-080027af0e2a (kibana)\r\n      + Running pre-stop         OK\r\n      + Stopping services        OK\r\n      + Removing jail process    OK\r\n      + Running post-stop        OK\r\n\r\nAnd inuse emits a warning:\r\n\r\n    # iocage inuse      \r\n    UUID,TAG,cputime,datasize,stacksize,coredumpsize,memoryuse,memorylocked,maxproc,openfiles,vmemoryuse,pseudoterminals,swapuse,nthr,msgqqueued,msgqsize,nmsgq,nsem,nsemop,nshm,shmsize,wallclock,pcpu\r\n    608d1dc1-cffd-11e5-9a8d-080027af0e2a,pgsql,0,56K,264K,0,8380K,0,2,80,74M,0,0,2,0,0,0,0,0,0,0,415,0\r\n    853c5a30-cffe-11e5-9a8d-080027af0e2a,redis,0,56K,264K,0,8388K,0,2,80,74M,0,0,2,0,0,0,0,0,0,0,438,0\r\n    [: -gt: unexpected operator\r\n\r\nI stop another jail:\r\n       \r\n    # iocage stop redis\r\n    * Stopping 853c5a30-cffe-11e5-9a8d-080027af0e2a (redis)\r\n      + Running pre-stop         OK\r\n      + Stopping services        OK\r\n      + Removing jail process    OK\r\n      + Running post-stop        OK\r\n\r\nYou get the point :)\r\n      \r\n    # iocage inuse     \r\n    UUID,TAG,cputime,datasize,stacksize,coredumpsize,memoryuse,memorylocked,maxproc,openfiles,vmemoryuse,pseudoterminals,swapuse,nthr,msgqqueued,msgqsize,nmsgq,nsem,nsemop,nshm,shmsize,wallclock,pcpu\r\n    608d1dc1-cffd-11e5-9a8d-080027af0e2a,pgsql,0,56K,264K,0,8380K,0,2,80,74M,0,0,2,0,0,0,0,0,0,0,438,0\r\n    [: -gt: unexpected operator\r\n    [: -gt: unexpected operator\r\n"},"comment":{"url":"https://api.github.com/repos/iocage/iocage/issues/comments/184533592","html_url":"https://github.com/iocage/iocage/issues/336#issuecomment-184533592","issue_url":"https://api.github.com/repos/iocage/iocage/issues/336","id":184533592,"user":{"login":"olgeni","id":412031,"avatar_url":"https://avatars.githubusercontent.com/u/412031?v=3","gravatar_id":"","url":"https://api.github.com/users/olgeni","html_url":"https://github.com/olgeni","followers_url":"https://api.github.com/users/olgeni/followers","following_url":"https://api.github.com/users/olgeni/following{/other_user}","gists_url":"https://api.github.com/users/olgeni/gists{/gist_id}","starred_url":"https://api.github.com/users/olgeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olgeni/subscriptions","organizations_url":"https://api.github.com/users/olgeni/orgs","repos_url":"https://api.github.com/users/olgeni/repos","events_url":"https://api.github.com/users/olgeni/events{/privacy}","received_events_url":"https://api.github.com/users/olgeni/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T05:58:51Z","updated_at":"2016-02-16T05:58:51Z","body":"Thanks! \\o/"}}