Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden - archive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
713
Warden
Warden - archive
Commits
72b9d955
"src/warden-server/lib/WardenWatchdog.pm" did not exist on "21a4e9b9d90605c8c32116401dfc4b3c568e60a9"
Commit
72b9d955
authored
10 years ago
by
Tomáš Plesník
Browse files
Options
Downloads
Patches
Plain Diff
rozdeleno tisknuti pouze validnich a vsech klientu
parent
a417bee3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/warden-server/bin/getClients.pl
+12
-5
12 additions, 5 deletions
src/warden-server/bin/getClients.pl
src/warden-server/doc/README
+3
-2
3 additions, 2 deletions
src/warden-server/doc/README
with
15 additions
and
7 deletions
src/warden-server/bin/getClients.pl
+
12
−
5
View file @
72b9d955
...
...
@@ -35,13 +35,14 @@ WardenCommon::loadConf($conf_file);
# FUNCTIONS
################################################################################
sub
usage
{
print
"
Usage:
$RealScript
(without parameters) [
-h -V]
\n
";
print
"
Usage:
$RealScript
[-a
-h -V]
\n
";
exit
1
;
}
sub
help
{
print
"
$RealScript
(without parameters) [-h -V]
\n
";
print
"
$RealScript
[-a -h -V]
\n
";
print
"
-a print all clients (invalid clients included)
\n
";
print
"
-h print this text and exit
\n
";
print
"
-V print version and exit
\n
";
exit
0
;
...
...
@@ -57,9 +58,10 @@ sub version {
################################################################################
# MAIN
################################################################################
our
(
$opt_h
,
$opt_V
);
our
(
$opt_a
,
$opt_h
,
$opt_V
);
die
usage
unless
getopts
("
hV
");
die
usage
unless
getopts
("
ahV
");
my
$all
=
$opt_a
;
my
$help
=
$opt_h
;
my
$script_version
=
$opt_V
;
...
...
@@ -77,7 +79,12 @@ if ($script_version) {
my
$dbh
=
WardenCommon::
connectDB
;
# obtain data from DB
my
$sth
=
$dbh
->
prepare
("
SELECT * FROM clients ORDER BY client_id ASC;
")
or
die
"
Cannot prepare statement:
"
.
$dbh
->
errstr
;
my
$sth
;
if
(
$all
)
{
$sth
=
$dbh
->
prepare
("
SELECT * FROM clients ORDER BY client_id ASC;
")
or
die
"
Cannot prepare statement:
"
.
$dbh
->
errstr
;
}
else
{
$sth
=
$dbh
->
prepare
("
SELECT * FROM clients WHERE valid='t' ORDER BY client_id ASC;
")
or
die
"
Cannot prepare statement:
"
.
$dbh
->
errstr
;
}
$sth
->
execute
or
die
"
Cannot execute statement:
"
.
$sth
->
errstr
;
my
$hash_ref
=
$sth
->
fetchall_hashref
("
client_id
");
...
...
This diff is collapsed.
Click to expand it.
src/warden-server/doc/README
+
3
−
2
View file @
72b9d955
...
...
@@ -368,8 +368,9 @@ H. Status Info
2. Get Clients
Function getClients is accessible via getClients.pl. Function has no input
parameters and returns detailed information about all registered clients.
Function getClients is accessible via getClients.pl. Function returns detailed
information about valid or all (-a) registered clients. Parameter -a returns
valid and invalid clients together.
--------------------------------------------------------------------------------
I. Warden Watchdog
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment