| To: | pcp@xxxxxxxxxxx |
|---|---|
| Subject: | Possible bug in pmwebapi |
| From: | Benjamin De Cock <dcbenjamindc@xxxxxxxxx> |
| Date: | Mon, 21 Mar 2016 15:02:30 +0100 |
| Delivered-to: | pcp@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=BRwRCKazfOCbdOiy32hBEdTDJFdlB6KmZdR72fAEaaw=; b=IAaZQM7DZD3oStQO8gVb+DjJJZg1b6QJ8+FDc8EC4oCGoVJiincU5JewT527JHKJZ0 aQdTPj+OSI5KsbsTJh6BE5YsPB2V4RNCxyyE+LBxTpdwugvLi8iebzG8xs0bfieA9Mv7 RkxWAx0oQuCYNC3QJSRJndyK9GhAXD/3QxBeoxfeDGgb5hW7xRrR601B+1E6Xh1cgOSj Z5NOPzArfKQHKI57sLBO1AMS1lqNo8f360b4ALLPDsNTkZzcVTq5OpDYshFsq8FFuzl/ v3hN6Xp7K5io3UKH0XaaY6o+5sep4CK3FMJE57ivKeQDK3Tzgoan8RraXtHNNBjCDJOC ldlw== |
|
I noticed a strange behaviour of the pmwebapi interface Consider this example: http://hostname4:44323/pmapi/context?hostname=localhost <-- context = hostname { "context": 1075663241 } {"timestamp":{"s":1458567943,"us":908918 }, "values":[{"pmid":251663363,"name":"filesys.free","instances":[ {"instance":0, "value":697781208 },{"instance":1, "value":98850 }]}]} http://hostname4:44323/pmapi/1247214105/_fetch?names=hotproc.memory.size <-- hotproc namespace = nok {"timestamp":{"s":1458567973,"us":760073 }, "values":[]} <-- empty Whereas on the host: perftest@hostname4:~$ pminfo | grep hotproc.memory.size <-- hotproc captured = ok hotproc.memory.size perftest@hostname4:~$ perftest@hostname4:~$ pminfo -dfmtT hotproc.memory.size <-- checking values = ok hotproc.memory.size PMID: 3.53.0 [instantaneous virtual size of process, excluding page table and task structure.]   Data Type: 32-bit unsigned int ÂInDom: 3.39 0xc00027   Semantics: instant ÂUnits: Kbyte Help: instantaneous virtual size of process, excluding page table and task structure.   inst [5988 or "005988 SCREEN"] value 25800   inst [5989 or "005989 /bin/bash"] value 21548   inst [25910 or "025910 sshd: perftest@pts/0"] value 105816   inst [25911 or "025911 -bash"] value 21464 perftest@hostname4:~$ pminfo -dfmtT hotproc.memory.size -a /var/log/pcp/pmlogger/hostname4/20160320.23.10.index <-- checking archive Â= ok hotproc.memory.size PMID: 3.53.0 One-line Help: Error: Operation requires context with host source of metrics <-- help error = 'ok'   Data Type: 32-bit unsigned int ÂInDom: 3.39 0xc00027   Semantics: instant ÂUnits: Kbyte Full Help: Error: Operation requires context with host source of metrics   inst [5988 or "005988 SCREEN"] value 25800   inst [5989 or "005989 /bin/bash"] value 21548   inst [18833 or "018833 tmux"] value 30188   inst [18834 or "018834 -bash"] value 21636   inst [27865 or "027865 sshd: perftest@pts/4"] value 105672   inst [27866 or "027866 -bash"] value 21704 So the hotproc namespace is not accessible using the pmwebapi, however... http://hostname4:44323/pmapi/context?archivefile=/var/log/pcp/pmlogger/hostname4/20160320.23.10.index <-- context = archivefile { "context": 769825523 } http://hostname4:44323/pmapi/769825523/_fetch?names=hotproc.memory.size <-- hotproc namespace works as expected... {"timestamp":{"s":1458515471,"us":839497 }, "values":[{"pmid":12637184,"name":"hotproc.memory.size","instances":[ {"instance":5988, "value":25800 },{"instance":5989, "value":21548 },{"instance":18833, "value":30188 },{"instance":18834, "value":21636 },{"instance":27865, "value":105672 },{"instance":27866, "value":21704 }]}]} My conclusion: the pmwebapi only allows for exposure of the hotproc namespace via the archivefile context, but one would expect it to work for the hostname context as well. Regards Benjamin |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | pmrep: Handle Python 3 BrokenPipeError in Python 2 Compatible Manner, Marko Myllynen |
|---|---|
| Next by Date: | [Bug 1304722] pcp pmda subrpm remove should trigger ./Remove script, bugzilla |
| Previous by Thread: | pmrep: Handle Python 3 BrokenPipeError in Python 2 Compatible Manner, Marko Myllynen |
| Next by Thread: | Re: Possible bug in pmwebapi, Frank Ch. Eigler |
| Indexes: | [Date] [Thread] [Top] [All Lists] |