summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorRong Tao <rongtao@cestc.cn>2022-11-08 15:47:57 +0300
committerVlastimil Babka <vbabka@suse.cz>2022-11-10 12:00:38 +0300
commit654058e67b9490a655d9a01e838168fb499f2aa3 (patch)
tree6e8bbdeb1cd27f4d167a184711b45a62d1d985a3 /tools/perf/scripts/python/export-to-postgresql.py
parent247f34f7b80357943234f93f247a1ae6b6c3a740 (diff)
downloadlinux-654058e67b9490a655d9a01e838168fb499f2aa3.tar.xz
tools/vm/slabinfo: indicates the cause of the EACCES error
If you don't run slabinfo with a superuser, return 0 when read_slab_dir() reads get_obj_and_str("slabs", &t), because fopen() fails (sometimes EACCES), causing slabcache() to return directly, without any error during this time, we should tell the user about the EACCES problem instead of running successfully($?=0) without any error printing. For example: $ ./slabinfo Permission denied, Try using superuser <== What this submission did $ sudo ./slabinfo Name Objects Objsize Space Slabs/Part/Cpu O/S O %Fr %Ef Flg Acpi-Namespace 5950 48 286.7K 65/0/5 85 0 0 99 Acpi-Operand 13664 72 999.4K 231/0/13 56 0 0 98 ... Signed-off-by: Rong Tao <rongtao@cestc.cn> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions