Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91242483
hpc_check
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 9, 07:21
Size
1 KB
Mime Type
text/x-perl
Expires
Mon, Nov 11, 07:21 (2 d)
Engine
blob
Format
Raw Data
Handle
22228113
Attached To
rSLURMACCOUNTS slurm-accounts
hpc_check
View Options
#!/usr/bin/perl -w
use
strict
;
use
FindBin
;
use
lib
"$FindBin::RealBin/../lib/blib"
;
use
ParseAccounts
;
use
Slurm
;
use
Cwd
'abs_path'
;
my
$accounts_file
=
"accounts.yaml"
;
my
$verbose
=
0
;
# -----------------------------------------------------------------------------
# Command line options
#
my
%opt
;
sub
print_usage
()
{
print
STDERR
<<
"EOF"
;
Check
account
definition
file
$accounts_file
usage:
$0
[
-
hv
]
OPTIONS
-
v
:
verbose
,
print
internal
hash
data
structures
-
h
:
this
(
help
)
message
example:
$0
EOF
exit
;
}
sub
init
()
{
use
Getopt::
Std
;
my
$opt_string
=
'hv'
;
getopts
(
"$opt_string"
,
\
%opt
)
or
print_usage
();
# pathname of logfile
$accounts_file
=
abs_path
(
"$FindBin::RealBin/../etc/"
.
$accounts_file
);
print_usage
()
if
$opt
{
h
};
print_usage
()
if
(
scalar
@ARGV
>
1
);
$verbose
=
1
if
$opt
{
v
};
}
&
init
();
ParseAccounts::
init
(
Slurm::
get_cluster_name
(),
$accounts_file
);
if
(
$verbose
)
{
print
"Group:accounts\n"
;
print
"--------------\n"
;
ParseAccounts::
print_groups
();
print
"Accounts\n"
;
print
"--------\n"
;
ParseAccounts::
print_accounts
();
}
Event Timeline
Log In to Comment