ceph crash ls
-List the timestamp/uuid crashids for all saved crash info.
+List the timestamp/uuid crashids for all new and archived crash info.
+
+::
+
+ ceph crash ls-new
+
+List the timestamp/uuid crashids for all newcrash info.
::
self.crashes[crashid] = metadata
key = 'crash/%s' % crashid
self.set_store(key, json.dumps(metadata))
+ self._refresh_health_checks()
return 0, '', ''
def ls(self):
return self.do_ls({'prefix': 'crash ls'}, '')
def do_ls(self, cmd, inbuf):
- r = self.crashes.values()
+ if cmd['prefix'] == 'crash ls':
+ r = self.crashes.values()
+ else:
+ r = [crash for crashid, crash in self.crashes.items()
+ if 'archived' not in crash]
if cmd.get('format') == 'json' or cmd.get('format') == 'json-pretty':
return 0, json.dumps(r, indent=4), ''
else:
},
{
'cmd': 'crash ls',
- 'desc': 'Show saved crash dumps',
+ 'desc': 'Show new and archived crash dumps',
+ 'perm': 'r',
+ 'handler': do_ls,
+ },
+ {
+ 'cmd': 'crash ls-new',
+ 'desc': 'Show new crash dumps',
'perm': 'r',
'handler': do_ls,
},