From ebd4d9fe6dd0fb9ade36eb1bcc644e3b64c91d5e Mon Sep 17 00:00:00 2001 From: zc666094 Date: Sat, 10 Jun 2023 18:46:32 +0800 Subject: [PATCH] add scrip --- LSF-Script/collection/userCount | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 LSF-Script/collection/userCount diff --git a/LSF-Script/collection/userCount b/LSF-Script/collection/userCount new file mode 100644 index 0000000..7d60869 --- /dev/null +++ b/LSF-Script/collection/userCount @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import os + +USERS_CMD = 'source @SCHEDULER_PROFILE_PATH@; timeout 10 busers all' + +arrayUsersInfo = os.popen(USERS_CMD).read().splitlines() + +print(len(arrayUsersInfo) - 1) \ No newline at end of file -- Gitee