From 3fb4685f09c7a965b4556dd57f1434cdd01ce238 Mon Sep 17 00:00:00 2001 From: zc666094 Date: Mon, 12 Jun 2023 10:42:49 +0800 Subject: [PATCH] =?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 | 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