{"id":631,"date":"2024-10-22T10:39:13","date_gmt":"2024-10-22T07:39:13","guid":{"rendered":"https:\/\/itgen.itbumper.com\/?page_id=631"},"modified":"2024-10-22T10:41:23","modified_gmt":"2024-10-22T07:41:23","slug":"linux-1c-8-3-server-users-sessions-terminate","status":"publish","type":"page","link":"https:\/\/itgen.itbumper.com\/?page_id=631","title":{"rendered":"Linux \/ 1C 8.3 Server user`s sessions terminate"},"content":{"rendered":"\n\n<p>This script will find a cluster ID and terminate all user`s sessions.<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#!\/bin\/bash\n# Run the Remote Administration Server (RAS) in daemon mode to manage the 1C cluster.\n\/opt\/1C\/v8.3\/x86_64\/ras --daemon cluster\n\n# Get the cluster`s ID \n_cluster=$(\/opt\/1C\/v8.3\/x86_64\/rac cluster list  | grep 'cluster '| awk -F' ' '{print $3}')\n\n# Get active sessions\n_session=$(\/opt\/1C\/v8.3\/x86_64\/rac session --cluster=$_cluster list | grep 'session '| awk '{print$3}')\n\n# List the cluster ID and all sessions ID\necho 'Cluster: ' $_cluster\necho 'Sessions:  ' $_session\n\n# Close all found sessions\nfor session in $_session\ndo\n\/opt\/1C\/v8.3\/x86_64\/rac session --cluster=$_cluster terminate --session=$session\ndone\n# Check, list sessions on the cluster (if ok = no sessions)\n\/opt\/1C\/v8.3\/x86_64\/rac session --cluster=$_cluster list\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>This script will find a cluster ID and terminate all user`s sessions.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/631"}],"collection":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=631"}],"version-history":[{"count":3,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/631\/revisions"}],"predecessor-version":[{"id":635,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/631\/revisions\/635"}],"wp:attachment":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}