I try to create an script to save the output of the [/interface lte number=0 cell-monitor duration=5]; to future analisys, but all files and all variables stay nil
{
:local filename “ltecellmonitor.txt”;
:local content [/interface lte cell-monitor number=0 duration=5];
[/file set $filename contents=$content];
}
but i noticed what all info just are displayed while the command is running, from way, i think what is necessary to run another script in parallel to save the data ?
:local cell ([/interface lte cell-monitor number=0 duration=5]);
:log info message="cell_info=$cell";
PS use code tag around your code to make your post more readable.
Edit after some search found this on how to write to a file:
# Create a file with specific content.
{
# Variables.
:local filename "test.txt"
:local content "This is a test."
# Create file.
/file print file=$filename where name=""
# Wait for the file to be created.
:delay 1
# Set file's content.
/file set $filename contents=$content
}
So try this:
# Create a file with specific content.
{
# Variables.
:local filename "ltecellmonitor.txt"
:local content [/interface lte cell-monitor number=0 duration=5]
# Create file.
/file print file=$filename where name=""
# Wait for the file to be created.
:delay 1
# Set file's content.
/file set $filename contents=$content
}
I have tried these forms, but the output of the cell-info command returns a NULL value, ie it is not stored in a variable, the output of the command is visible only at its execution time, already tried to display it in log, already tried with global variable, but has not yet been successful.