Index: openib/src/userspace/management/osm/include/opensm/osm_log.h
===================================================================
--- openib/src/userspace/management/osm/include/opensm/osm_log.h	(.../tags/ofed1.1rc7-11llnl)	(revision 471)
+++ openib/src/userspace/management/osm/include/opensm/osm_log.h	(.../trunk)	(revision 471)
@@ -125,6 +125,8 @@
 	unsigned long                   max_size;
 	boolean_t			flush;
 	FILE*				out_port;
+  	boolean_t                       accum_log_file;
+        char *                          log_file_name;
 } osm_log_t;
 /*********/
 
Index: openib/src/userspace/management/osm/complib/cl_log.c
===================================================================
--- openib/src/userspace/management/osm/complib/cl_log.c	(.../tags/ofed1.1rc7-11llnl)	(revision 471)
+++ openib/src/userspace/management/osm/complib/cl_log.c	(.../trunk)	(revision 471)
@@ -126,5 +126,4 @@
 	{
 		syslog( priority, "%s\n", message );
 	}
-	closelog();
 }
Index: openib/src/userspace/management/osm/opensm/osm_log.c
===================================================================
--- openib/src/userspace/management/osm/opensm/osm_log.c	(.../tags/ofed1.1rc7-11llnl)	(revision 471)
+++ openib/src/userspace/management/osm/opensm/osm_log.c	(.../trunk)	(revision 471)
@@ -59,6 +59,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
+#include <signal.h>
 
 #ifndef WIN32
 #include <sys/time.h>
@@ -224,6 +225,56 @@
 #endif /* defined( _DEBUG_ ) */
 }
 
+static int
+open_out_port(IN osm_log_t *p_log)
+{
+    struct stat st;
+
+    if (p_log->accum_log_file)
+      p_log->out_port = fopen(p_log->log_file_name, "a+");
+    else
+      p_log->out_port = fopen(p_log->log_file_name, "w+");
+
+    if (!p_log->out_port)
+    {
+      if (p_log->accum_log_file)
+        syslog(LOG_CRIT, "Cannot open %s for appending. Permission denied\n",
+			p_log->log_file_name);
+      else
+        syslog(LOG_CRIT, "Cannot open %s for writing. Permission denied\n",
+			p_log->log_file_name);
+
+      return(IB_UNKNOWN_ERROR);
+    }
+
+    if (fstat(fileno(p_log->out_port), &st) == 0)
+      p_log->count = st.st_size;
+
+    syslog(LOG_NOTICE, "%s log file opened\n", p_log->log_file_name);
+
+    return (0);
+}
+
+
+osm_log_t *handler_log = NULL;
+void
+sigusr1_handler(int signal)
+{
+	fclose(handler_log->out_port);
+	open_out_port(handler_log);
+}
+
+static void
+setup_sigusr1_handler(osm_log_t *p_log)
+{
+	struct sigaction act;
+	act.sa_handler = sigusr1_handler;
+	sigemptyset(&(act.sa_mask));
+	act.sa_flags = 0;
+	handler_log = p_log;
+	sigaction(SIGUSR1, &act, NULL);
+}
+
 ib_api_status_t
 osm_log_init_v2(
   IN osm_log_t* const p_log,
@@ -233,13 +284,15 @@
   IN const unsigned long max_size,
   IN const boolean_t accum_log_file )
 {
-  struct stat st;
-
   p_log->level = log_flags;
   p_log->flush = flush;
   p_log->count = 0;
-  p_log->max_size = 0;
+  p_log->max_size = max_size;
+  p_log->accum_log_file = accum_log_file;
+  p_log->log_file_name = (char *)log_file;
 
+  openlog("OpenSM", LOG_CONS | LOG_PID, LOG_USER);
+
   if (log_file == NULL || !strcmp(log_file, "-") ||
       !strcmp(log_file, "stdout"))
   {
@@ -251,29 +304,13 @@
   }
   else
   {
-    if (accum_log_file)
-      p_log->out_port = fopen(log_file, "a+");
-    else
-      p_log->out_port = fopen(log_file, "w+");
-
-    if (!p_log->out_port)
-    {
-      if (accum_log_file)
-        printf("Cannot open %s for appending. Permission denied\n", log_file);
-      else
-        printf("Cannot open %s for writing. Permission denied\n", log_file);
-
-      return(IB_UNKNOWN_ERROR);
-    }
-
-    if (fstat(fileno(p_log->out_port), &st) == 0)
-      p_log->count = st.st_size;
-
-    p_log->max_size = max_size;
+	  setup_sigusr1_handler(p_log);
+	  if (open_out_port(p_log))
+	  {
+		  return (IB_UNKNOWN_ERROR);
+	  }
   }
 
-  openlog("OpenSM", LOG_CONS | LOG_PID, LOG_USER);
-
   if (cl_spinlock_init( &p_log->lock ) == CL_SUCCESS) 
     return IB_SUCCESS;
   else
Index: openib/src/userspace/management/osm/man/opensm.8
===================================================================
--- openib/src/userspace/management/osm/man/opensm.8	(.../tags/ofed1.1rc7-11llnl)	(revision 471)
+++ openib/src/userspace/management/osm/man/opensm.8	(.../trunk)	(revision 471)
@@ -32,9 +32,10 @@
 The first file will register only general major events, whereas the second
 will include details of reported errors. All errors reported in this second 
 file should be treated as indicators of IB fabric health issues.
-(Note that when a fatal and non-recoverable error occurs, opensm will 
-exit.) Both log files should include the message "SUBNET UP" if opensm
-was able to setup the subnet correctly.
+(Note that when a fatal and non-recoverable error occurs, opensm will exit.)
+Both log files should include the message "SUBNET UP" if opensm was able to
+setup the subnet correctly.  Finally, SIGUSR1 can be used to trigger a reopen
+of /var/log/osm.log for logrotate purposes.
 
 .SH OPTIONS
 
