8 use vars qw($dbhost $dbname $dbuser $dbpass $dbport
10 require "$ENV{BFConfDir}/BuildFarmWeb.pl";
12 die "no dbname" unless $dbname;
13 die "no dbuser" unless $dbuser;
15 my $dsn="dbi:Pg:dbname=$dbname";
16 $dsn .= ";host=$dbhost" if $dbhost;
17 $dsn .= ";port=$dbport" if $dbport;
19 my $db = DBI->connect($dsn,$dbuser,$dbpass);
21 die $DBI::errstr unless $db;
23 my $sth = $db->prepare(q[
24 SELECT name, status, operating_system, os_version, sys_owner, owner_email
25 FROM buildsystems AS b
30 my $format = "%-10s %-10s %-18s %-20s %-18s %-s\n";
31 printf $format, "SysName", "Status", "Owner", "Email", "Distro", "Version";
32 while (my $row = $sth->fetchrow_hashref)
34 printf $format, $row->{name}, $row->{status}, $row->{sys_owner},
35 $row->{owner_email}, $row->{operating_system},