Skip to content
Snippets Groups Projects
Commit c51d53f0 authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

uprava tabulky klientu podle getClients.pl

parent 45657b64
No related branches found
No related tags found
No related merge requests found
...@@ -28,23 +28,23 @@ use WardenClient; ...@@ -28,23 +28,23 @@ use WardenClient;
# obtain information about already registered clients # obtain information about already registered clients
my @clients = WardenClient::getClientInfo() or exit 1; # receive data or exit my @clients = WardenClient::getClientInfo() or exit 1; # receive data or exit
print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
print "| Client ID | Hostname | Registered | Requestor | Service | CT | Type | ROE | Description tags | IP Net Client |\n"; print "| Client ID | Hostname | Registered | Requestor | Service | CT | Type | ROE | Description tags | IP Net Client |\n";
print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
foreach (@clients) { foreach (@clients) {
printf("| %-10s ", $_->{'client_id'} || "NULL"); printf("| %-14s ", $_->{'client_id'} || "unknown");
printf("| %-30s ", $_->{'hostname'} || "NULL"); printf("| %-36s ", $_->{'hostname'} || "unknown");
printf("| %19s ", $_->{'registered'} || "NULL"); printf("| %19s ", $_->{'registered'} || "unknown");
printf("| %-23s ", $_->{'requestor'} || "NULL"); printf("| %-27s ", $_->{'requestor'} || "unknown");
printf("| %-25s ", $_->{'service'} || "NULL"); printf("| %-22s ", $_->{'service'} || "-");
printf("| %-2s ", $_->{'client_type'} || "NULL"); printf("| %-1s ", $_->{'client_type'} || "unknown");
printf("| %-15s ", $_->{'type'} || "NULL"); printf("| %-16s ", $_->{'type'} || "-");
printf("| %-4s ", $_->{'receive_own_events'} || "NULL"); printf("| %-1s ", $_->{'receive_own_events'} || "-");
printf("| %-50s ", $_->{'description_tags'} || "NULL"); printf("| %-47s ", $_->{'description_tags'} || "-");
printf("| %-18s |\n", $_->{'ip_net_client'} || "NULL"); printf("| %-18s |\n", $_->{'ip_net_client'} || "unknown");
} }
print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n"; print "+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
print "\n"; print "\n";
print "Current registered clients in: " . scalar localtime(time) . "\n"; print "Current registered clients in: " . scalar localtime(time) . "\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment