Hi Team,
I need to show the information about a file in linux server without the message “Duplicate.x” repetead
The sampler code says this:
#! /usr/bin/bash
echo “Row,Descripcion”
/bin/cat /tmp/pnum47333.txt
Plugin: toolkit
Regards!
Hi Team,
I need to show the information about a file in linux server without the message “Duplicate.x” repetead
The sampler code says this:
#! /usr/bin/bash
echo “Row,Descripcion”
/bin/cat /tmp/pnum47333.txt
Plugin: toolkit
Regards!
Hi!
The first column in Geneos dataview tables is “special” and is not normal data, but instead a label that refers to the other cells in the same row. For this reason it must be unique. If a second row comes in the with the same first column then you get _duplicateX
appended to it, as you have seen.
Looking at your dataview, your are not processing the data into Geneos data cells, but instead just sending the data in as text.
If you process the text and break it down into “useful” cells and ensure that the rowname (first column) is informative and unique, then you will get better results.
The rowname should also be used to identify the same data from one sample to the next, so while plugins like SQL-Toolkit can add incremental numeric rowname, this isn’t useful if the data in the other cells in that row move up and down.
Hope this helps.
Hi Pete,
Thanks for you answer. Do you have any examples to try?
You said “If you process the text and break it down into “useful” cells and ensure that the rowname (first column) is informative and unique, then you will get better results.”
How would it be?
Thanks in advance!
Regards
Looking at the screenshots you have on your OP, I suggest pivoting the output of the underlying reporting command into columns, perhaps using the “Record ID” as the rowname and then using the other lines as key / value pairs to create columns in your shell script.
As I don’t know the source of the data or how regular the field values are I cannot suggest the best approach to this, but if the source is a SQL query, then each column of the SQL query would normally be a Geneos dataview column, with a unique value being the first column.
So, you would have columns like “Process Name”, “Process Number” etc.
Depending on your previous experience, UNIX/Linux test processing tools like awk/sed/perl may help. If you can do the hard work nearer the source of the data, then even better.
Toolkit accepts an extended CSV format, but the column headings must be the first row. After that you can send matching data lines and also “headlines” as per the toolkit docs.
Peter
Hi Peter,
The source of the data is an output format txt in Linux. I run a command that run a Select Static from Connect Direct(ndm). The source is not a SQL query.
I use toolkit plugin. Do you have any examples?
Regards
In linux I try with this solution with awk
/bin/cat /tmp/pnum47333.txt| awk ‘{print NR-1 “,” $0}; END {print “<!>rowCount,” NR-1}’
Is there any way to create the ouput?
In windows, what Can create the output?
Regards
I would imaging Powershell would help, but I am very much not familiar with PS, sorry!
You can install UNIX tools like awk
on Windows, but that may be overkill if Powershell can do the same natively.