Whamcloud - gitweb
LU-9221 jobstats: Create a pid-based hash for jobid values 08/25208/26
authorBen Evans <bevans@cray.com>
Wed, 1 Feb 2017 22:06:36 +0000 (16:06 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 21 Sep 2017 06:13:14 +0000 (06:13 +0000)
commit08479b74ec3599ee91e14f3f646389bb0aca4575
tree5c9be4c8cce45004bb201a59f7f7a7f4f60c03a0
parent011742134e3152f3e389ec30c08ccfc28d7a91a7
LU-9221 jobstats: Create a pid-based hash for jobid values

Use cfs_hash_table to create a pid to jobID based mapping.
Change default behavior of JobIDs to default to procname_uid if
a suitable value cannot be found in the environment.

All entries older than RESCAN_INTERVAL  seonds are refreshed
on access.
Items can be purged by writing to procfs_name.
"" will remove all entries
When purging the cache, items older than DELETE_INTERVAL are
deleted.

Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: I22e9d73c4585d7c5496829bc20bce191304e0d58
Reviewed-on: https://review.whamcloud.com/25208
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_class.h
lustre/obdclass/Makefile.in
lustre/obdclass/class_obd.c
lustre/obdclass/jobid.c [new file with mode: 0644]
lustre/obdclass/linux/linux-module.c