From ebd4d9fe6dd0fb9ade36eb1bcc644e3b64c91d5e Mon Sep 17 00:00:00 2001 From: zc666094 Date: Sat, 10 Jun 2023 18:46:32 +0800 Subject: [PATCH 1/2] 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 From ba691f173ca4ea004385eed262c1deabf4a2fe0d Mon Sep 17 00:00:00 2001 From: zc666094 Date: Mon, 12 Jun 2023 10:37:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LSF-Script/collection/userCount | 1 + 1 file changed, 1 insertion(+) diff --git a/LSF-Script/collection/userCount b/LSF-Script/collection/userCount index 7d60869..9ecd52d 100644 --- a/LSF-Script/collection/userCount +++ b/LSF-Script/collection/userCount @@ -6,4 +6,5 @@ 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