[ofa-general] [PATCH] export osm_log_max in MB

Doron Shoham dorons at voltaire.com
Thu Nov 6 06:22:03 PST 2008


Hal Rosenstock wrote:
> On Thu, Nov 6, 2008 at 8:57 AM, Doron Shoham <dorons at voltaire.com> wrote:
>> Hal Rosenstock wrote:
>>> On Thu, Nov 6, 2008 at 6:59 AM, Doron Shoham <dorons at voltaire.com> wrote:
>>>> export the osm_log_max in MB when using 'opensm -c <conf>
>>>>
>>>> Signed-off-by: Doron Shoham <dorons at voltaire.com>
>>>> ---
>>>>  opensm/opensm/osm_subnet.c |    4 ++--
>>>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
>>>> index 0422d0f..c130c0d 100644
>>>> --- a/opensm/opensm/osm_subnet.c
>>>> +++ b/opensm/opensm/osm_subnet.c
>>>> @@ -1668,7 +1668,7 @@ int osm_subn_write_conf_file(char *file_name, IN osm_subn_opt_t *const p_opts)
>>>>                "force_log_flush %s\n\n"
>>>>                "# Log file to be used\n"
>>>>                "log_file %s\n\n"
>>>> -               "# Limit the size of the log file. If overrun, log is restarted\n"
>>>> +               "# Limit the size of the log file in MB. If overrun, log is restarted\n"
>>>>                "log_max_size %lu\n\n"
>>>>                "# If TRUE will accumulate the log over multiple OpenSM sessions\n"
>>>>                "accum_log_file %s\n\n"
>>>> @@ -1694,7 +1694,7 @@ int osm_subn_write_conf_file(char *file_name, IN osm_subn_opt_t *const p_opts)
>>>>                p_opts->log_flags,
>>>>                p_opts->force_log_flush ? "TRUE" : "FALSE",
>>>>                p_opts->log_file,
>>>> -               p_opts->log_max_size,
>>>> +               p_opts->log_max_size/1024/1024,
>>>>                p_opts->accum_log_file ? "TRUE" : "FALSE",
>>>>                p_opts->dump_files_dir,
>>>>                p_opts->enable_quirks ? "TRUE" : "FALSE",
>>> Should your patch for adding opensm.conf to scripts should be updated to v2 ?
>>>
>>> -- Hal
>>>
>> Can you please explain?
> 
> Doesn't this change these lines (a comment and the value of
> log_max_size) in the opensm.conf file which you are proposing to be
> added into scripts ?
> 
> -- Hal
> 

The first patch converts the log_size from opensm.conf to MB.
The second one converts in the opposite direction when opensm dump
its configuration.


>> Thanks,
>> Doron
>>
>>>> --
>>>> 1.5.3.8
>>>>
>>>>
>>>> _______________________________________________
>>>> general mailing list
>>>> general at lists.openfabrics.org
>>>> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>>>>
>>>> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>>>>
>>




More information about the general mailing list