projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
client: pretty up probe output
[fio.git]
/
client.c
diff --git
a/client.c
b/client.c
index ef23c3e932c0d91a52a6cfcf64b7d1673af516e9..87d03c61ab9dae2844bc30be6902777d194e9cd0 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-150,8
+150,6
@@
int fio_client_add(const char *hostname, void **cookie)
&client->addr.sin_addr))
return -1;
&client->addr.sin_addr))
return -1;
- printf("%s %d %d\n", client->hostname, client->is_sock, client->port);
-
client->fd = -1;
__fio_client_add_cmd_option(client, "fio");
client->fd = -1;
__fio_client_add_cmd_option(client, "fio");
@@
-178,7
+176,8
@@
static int fio_client_connect_ip(struct fio_client *client)
if (connect(fd, (struct sockaddr *) &client->addr, sizeof(client->addr)) < 0) {
log_err("fio: connect: %s\n", strerror(errno));
if (connect(fd, (struct sockaddr *) &client->addr, sizeof(client->addr)) < 0) {
log_err("fio: connect: %s\n", strerror(errno));
- log_err("fio: failed to connect to %s\n", client->hostname);
+ log_err("fio: failed to connect to %s:%u\n", client->hostname,
+ client->port);
close(fd);
return -1;
}
close(fd);
return -1;
}
@@
-218,8
+217,6
@@
static int fio_client_connect(struct fio_client *client)
dprint(FD_NET, "client: connect to host %s\n", client->hostname);
dprint(FD_NET, "client: connect to host %s\n", client->hostname);
- memset(&client->addr, 0, sizeof(client->addr));
-
if (client->is_sock)
fd = fio_client_connect_sock(client);
else
if (client->is_sock)
fd = fio_client_connect_sock(client);
else
@@
-368,6
+365,7
@@
static int fio_client_send_ini(struct fio_client *client, const char *filename)
if (len) {
log_err("fio: failed reading job file %s\n", filename);
close(fd);
if (len) {
log_err("fio: failed reading job file %s\n", filename);
close(fd);
+ free(buf);
return 1;
}
return 1;
}
@@
-533,9
+531,18
@@
static void handle_eta(struct fio_net_cmd *cmd)
static void handle_probe(struct fio_net_cmd *cmd)
{
struct cmd_probe_pdu *probe = (struct cmd_probe_pdu *) cmd->payload;
static void handle_probe(struct fio_net_cmd *cmd)
{
struct cmd_probe_pdu *probe = (struct cmd_probe_pdu *) cmd->payload;
+ const char *os, *arch;
+
+ os = fio_get_os_string(probe->os);
+ if (!os)
+ os = "unknown";
+
+ arch = fio_get_arch_string(probe->arch);
+ if (!arch)
+ os = "unknown";
- log_info("
Probe: hostname=%s, be=%u, fio ver
%u.%u.%u\n",
- probe->hostname, probe->bigendian, probe->fio_major,
+ log_info("
hostname=%s, be=%u, os=%s, arch=%s, fio=
%u.%u.%u\n",
+ probe->hostname, probe->bigendian,
os, arch,
probe->fio_major,
probe->fio_minor, probe->fio_patch);
}
probe->fio_minor, probe->fio_patch);
}