[openib-general] progress...but opensm crashed
Hal Rosenstock
halr at voltaire.com
Mon Jan 3 13:34:43 PST 2005
On Mon, 2005-01-03 at 16:12, Johannes Erdfelt wrote:
> Why not just append to the previous log file? That's what pretty much
> every other daemon I've used does and what I would expect.
That seems like a better way to handle it. Any objections ?
OpenSM also creates some other files in /tmp. Should these be moved to
/var/log/osm/ ?
> Maybe also move the log file to /var/log too?
Sounds good. Here's the patch for this approach:
-- Hal
Index: osm_log.h
===================================================================
--- osm_log.h (revision 1456)
+++ osm_log.h (working copy)
@@ -259,10 +259,10 @@
}
else
{
- p_log->out_port = fopen(log_file,"w+");
+ p_log->out_port = fopen(log_file,"a+");
if (!p_log->out_port)
{
- printf("Cannot open %s for writing. Permission denied\n",
log_file);
+ printf("Cannot open %s for appending. Permission denied\n",
log_file);
return(IB_UNKNOWN_ERROR);
}
}
Index: osm_subnet.c
===================================================================
--- osm_subnet.c (revision 1456)
+++ osm_subnet.c (working copy)
@@ -433,7 +433,7 @@
p_opt->polling_retry_number = 4;
p_opt->force_heavy_sweep = FALSE;
p_opt->log_flags = 0;
- p_opt->log_file = "/tmp/osm.log";
+ p_opt->log_file = "/var/log/osm.log";
p_opt->port_profile_switch_nodes = FALSE;
p_opt->max_port_profile = 0xffffffff;
p_opt->pfn_ui_pre_lid_assign = NULL;
More information about the general
mailing list