aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeongJae Park <sj38.park@gmail.com>2024-03-09 13:23:31 -0800
committerSeongJae Park <sj38.park@gmail.com>2024-03-09 13:23:31 -0800
commit9de0f1241717e8e5b4a7d8dbf0f16e38ea6aa51b (patch)
treeeed074757063ddf977613d55c083409ece0f436f
parentf9a7e833a3ff099f2db37c5d6a583ef34f1df98c (diff)
downloaddamo-9de0f1241717e8e5b4a7d8dbf0f16e38ea6aa51b.tar.gz
damo_features: Add an option for inferring DAMON version
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
-rw-r--r--damo_features.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/damo_features.py b/damo_features.py
index 632b8f94..5318e922 100644
--- a/damo_features.py
+++ b/damo_features.py
@@ -4,6 +4,7 @@ import json
import _damon
import _damon_args
+import _damon_sysfs
def main(args):
_damon.ensure_root_and_initialized(args)
@@ -24,8 +25,14 @@ def main(args):
if args.type == 'json':
print(json.dumps(feature_supports, indent=4, sort_keys=True))
+ if args.infer_version:
+ print('Seems the version of DAMON is %s' %
+ _damon_sysfs.infer_damon_version())
+
def set_argparser(parser):
parser.add_argument('type', nargs='?',
choices=['supported', 'unsupported', 'all', 'json'], default='all',
help='type of features to listed')
+ parser.add_argument('--infer_version', action='store_true',
+ help='infer version of DAMON')
_damon_args.set_common_argparser(parser)