search cancel

Spectrum Alarm Title contains \u000d characters (^M - \r - CR = Carriage Return)


Article ID: 238670


Updated On:


CA Spectrum DX NetOps


There are some Alarm Titles with "\u000d" characters in Spectrum OneClick Console. The problem appeared after migrating from Windows to the Linux platform.


The $SPECROOT/custom/Events/CsPause/Probfff001ea_en_US file and other files have the ^M characters.

$ cat -v Probfff001ea_en_US

It is also visible in this output:

$ od -c Probfff001ea_en_US

CR = \r = Carriage Return
LF = \n = Line Feed

In DOS, all lines end with a CR/LF combination or \r\n.
In UNIX/Linux, all lines end with a single LF or \n.


All versions


First, make a backup of the $SPECROOT/custom/Events/ directory on the OneClick web server.

1) Go the the $SPECROOT/custom/Events/CsPCause/ directory.

# cd $SPECROOT/custom/Events/CsPCause/

2) Run the following syntax to remove the ^M character (CR=Carriage Return):

# for i in `find . -exec file "{}" + | grep CRLF | awk -F : '{print $1 }'`; do dos2unix $i; done

Note: The above syntax will scan and convert the files in sub-directories too (apply dos2unix recursively to all contents of a folder).

It will search for CRLF in a file (CR = Carriage Return and LF = Line Feed).

3) The ^M character (CR=Carriage Return) was removed:

4) Reload the changes in the OneClick Administration page - Update Event and Alarm Files.

5) Click on the "Update Event Configuration" button of the VNM model under the SpectroSERVER Control subview.

6) Clear the exiting active alarm in the Alarms tab.

7) The new alarm does not have the \u000d character in the Alarm Title column.

Additional Information

How to manually create event/alarm:

$ cd $SPECROOT/vnmsh

$ ./connect

$ ./create event type=0xfff001ea text="EVENT test" mh=0x1000069

Where the mh=0x1000069 is the model_handle of the device.