[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference csc32::consolemanager

Title:POLYCENTER Console Manager
Notice:Kits, Scans, Docs on CSC32:: as PCM$KITS:,PCM$DOCS:, PCM$SCANS:
Moderator:CSC32::BUTTERWORTH
Created:Thu Aug 06 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1541
Total number of notes:6564

617.0. "problems with EXTRACT on a CLARION node" by CSC32::BARELA () Sat Feb 18 1995 00:43

We are working with a customer who has been using PCM to monitor nodes,
and he recently began trying to monitor two CLARION Storageworks
entities...  He finds two general problems:
-  when he CONNECTs to the node(s), there is some garbled data (looks like
   portions of escape sequences) initially and after a <CR> (or two)
   the display returns to "normal"
   -  prior to using PCM to monitor these, VT300s were being used as
      their consoles (without problem)
   -  is is not a critical issue...
-  (the bigger problem is) an attempt to CONSOLE EXTRACT from these nodes
   results in similar garbled data, and it never clears up...
   -  this is a big problem since there is no way to look back at what
      data was monitored on this node...

We found:
-  a BACKUP/IGNORE=INTERLOCK of the nodes .LOG files yeilds a file
   which cannot be TYPEd because of RMS RTB errors (record sizes are in
   the 415,347 to 600,000 range)
   -  problems attempting to CONVERT this file because of the RTB error
   -  unsuccessful in "munging" the file to something more useful via
      SET FILE/ATTRIBUTES
-  if we DUMP the file (either the actual .LOG or the one created from
   the BACKUP/IGNORE=INTERLOCK) we see lots of escape sequences...
   -  was able to determine that MANY of them were for cursor positioning
      (like <ESC>[1;52H which positions cursor in row 1, col 52)
   -  "manually" placed these type of escape sequences in a file and
      found they were interpreted successfully
-  had him CONSOLE EXTRACT nodename/OUT=file.name
   -  this file could be TYPEd without the RTB error (it was also
      STREAM LF formatted records)
   -  but the escape sequences were not being interpreted as expected...
      (and the size of the file was significantly smaller than what one
      would expect)
   -  had him "manually" create a file with these type of escape sequences
      in them, and using that file, he saw the sequences interpreted
      successfully...
-  we dialed in:
   -  we did a CONSOLE CONNECT to the node and saw that behavior
      -  it was like the screen was being refreshed (and highlighting
	 and underlining was being done), and the "user response" was
	 mainly "enter any key to continue"
   -  we had problems REVIEWing or EXTRACTing data from that node
      -  we often saw the "no data found" type message
      -  it appears there is no LF being "seen" and that is why we are
	 seeing the HUGE records...

Questions:
-  Does PCM insert any record termination if none has been "seen"
   -  for example, I believe VCS would add record termination after 132
      characters if there was no termination within those 132 characters...
-  Has anyone seen behavior similar to this, and if so what approaches
   were taken to address it.
-  Does anyone have any insight to the CLARION storageworks entity?

Thanks in advance for any information and/or suggestions...

Rod Barela
Digital Customer Support Center
T.RTitleUserPersonal
Name
DateLines
617.1OPG::PHILIPAnd through the square window...Mon Feb 20 1995 10:4937
Hi,

  It would appear to me that the storageworks devices NEVER send a newline
  character, consequently, we never timestamp the data we receive, as a
  result, you only ever get one record in the log file and as you have seen,
  this record is rather large (415,347 to 600,000).

  Converting or setting file attributes the file will screw everything up
  as the .LOG, .TIMES and .EVENT files are delicately interlinked.

  Now as you determined, most of the output is escape sequences, I dont see
  how you expect EXTRACT to produce anything of use in this situation.

  To answer your questions...

>>-  Does PCM insert any record termination if none has been "seen"
>>   -  for example, I believe VCS would add record termination after 132
>>      characters if there was no termination within those 132 characters...

  No, we would consider that a corruption of the data stream, after all,
  what would happen if we put our artificial terminator in the middle of
  an escape sequence!!

>>-  Has anyone seen behavior similar to this, and if so what approaches
>>   were taken to address it.

  You get a simnilar result when trying to manage LPS20's using the
  LPS$CONSOLE utility. I normally recommend that logging is turned off for
  these systems. Turning logging of doesnt preclude the detection of events
  though, however, context for any detected events will not be available.

>>-  Does anyone have any insight to the CLARION storageworks entity?

  Nope, sorry.

Cheers,
Phil
617.2sample program to read such a file29067::BARELAFri Dec 08 1995 12:5795
    The following is a C program written to read a character at a time
    and write it to the terminal.  This is useful for a file like what
    is described in .0...
    This is included here since it may be useful to others...
    The comments assume the following is extracted to a file called
    PCM_EXTRTACT.C
    Rod Barela
    John Becker
    

/* This code read any file extracted by PCM and dumps the data to the terminal.

   This is useful when the extracted data contains escape sequences, or the 
   file has records too large to print because no carriage return was received.
   The most common occurance of this is when the output is from an application
   that uses screen formating calls (ie escape sequences) and never issues 
   a <cr>. If the PCM records this node's console data long enough, the PCM 
   logfile records may exceed 32767 bytes.  The extracted data will also be 
   too long for standard dcl command like TYPE or EDIT to use.  

   This code prompts for the file name and prints the data.

   To compile, enter 

	VMS 6.0:  $CC/LIST/MACHINE PCM_EXTRACT,SYS$INPUT/OPT
		  SYS$SHARE:VAXCRTL.EXE/SHARE <ctrl-z>

        VMS 6.1   $CC/DECC/STANARD=VAXC/LIST/MACHINE PCM_EXTRACT

   To link, enter

		  $LINK PCM_EXTRACT

*/

#include <stdio.h>
#include <string.h>

int main(void);

int main(void)
{

int status=0, done=0, byte=0, i;
FILE fpointer;               
char file_name[128];

/* ask user for the file name we need to print out */

    printf("Please enter the name of the file to print out \n\n");
    printf("Enter file name>   ");
    scanf("%s",&file_name);
    printf("\n\n");

/* upcase the name and make it look pretty for error reporting */

    for (i=0;i<strlen(file_name);i++)
	{
	file_name[i] = toupper(file_name[i]);
	}

/* open the file for read only */

    fpointer = fopen(file_name, "r");

/* report any problems with the open */

    if (fpointer == NULL)
	{
	printf("\n\nFailed to open the extract file.  Please confirm the file\n\n"); 
 	printf("    ");
	printf("%s\n", &file_name);
	printf("\nexists and the protection allows world read access.  Then rerun the program.\n");
	return(1);
        }

/* ok, now read each byte of the file and output to the terminal.
   "do" while we have not seen the eof marker */

    do
	{
	byte = fgetc(fpointer);
    	if (byte == -1)
	    {
	    done = 1;
	    }
	printf("%c",byte);
	}while (done != 1);

/* all done, close the file */

    fclose(fpointer);

}