Last active
January 30, 2025 07:31
-
-
Save b4tman/f0437fd54734de6ece9266eae922de44 to your computer and use it in GitHub Desktop.
1c get sessions count
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo -n "Всего лицензий: " && \ | |
rg "Количество пользователей:\s.*$" /var/1C/licenses/*.lic | rg -o "\b\\d{1,3}\b" | awk '{s+=$1} END {print s}' | |
echo -n "Всего сеансов: " && \ | |
/opt/1cv8/x86_64/current/rac session --cluster=$(/opt/1cv8/x86_64/current/rac cluster list localhost | rg -e "^cluster\s*:" -m 1 | rg -e "[[:xdigit:]-]{36}" -o) list| rg -c "^session\s" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment