Menu

Two questions

Anonymous
2013-10-09
2014-03-06
1 2 > >> (Page 1 of 2)
  • Anonymous

    Anonymous - 2013-10-09

    I have two questions re: BGINFO4X. I am setting up a new configuration and I can't seem to change the spacing between lines of text that is displayed. I have set Kerning as below but can tighten up the lines displayed.

    KERNING_HEADERFILE=".5"
    KERNING_OUTFILE=".5"
    KERNING_ALARMFILE=".5"

    The second question is that I have a server that does not respond to the netstat command. Can you do the same thing in alarms with Ping? Thanks!

     
  • BGINFO for X and for Windows!

    Hello, here are the answers:

    1- Kerning is the space between two letters. What you need is INTERLINE_SPACING_*. Find more info in: http://www.imagemagick.org/script/command-line-options.php#interline-spacing

    2- I don't understand your problem. What do you want to do exactlly? Then you want to alarm it?

    Regards.

     

    Last edit: BGINFO for X and for Windows! 2013-10-10
  • Anonymous

    Anonymous - 2013-10-10

    Thanks got both figured out. Was doing the netstat command wrong. But I do have a another question. Can Bginfo4x set a variable from an system environmental variable on the machine.
    If so can I display this variable in the Header section of BGINFO4x? Thanks for getting back to me.

     
  • BGINFO for X and for Windows!

    Hello,

    1- You can't display the variable directly, but it is easy to acomplish with the Script Module. To do it fast, uncomment the entry in SCRIPT.CONF:
    CUSTOM/CLIENT/WINDOWS/Script1.sh &

    Edit Script1.sh, remove the actual code except the line #!/bin/bash, and add below a line similar to:

    echo "YOUR_HEADER in $HOSTNAME" > CUSTOM/CLIENT/LINUX/HEADER.CONF

    The HEADER.CONF will be created with your environment variable.

    2- Can you upload the "netstat command - alarm" so others can benefit from it?

    Regards.

     
  • Anonymous

    Anonymous - 2013-10-10

    Thanks I will give that a shot. I am using Windows 7 environment would the command be the same? If so I would replace YOUR_HEADER with my environmental variable, correct?

    The Netstat command was for a second server and the code is the same except for the IP address. I have a document server and a print server. However today am testing it and I noticed that the print server is indicating as being down when it actually is running.

     
  • BGINFO for X and for Windows!

    Hello,

    • No, you need yo change $HOSTNAME for $YOUR_ENVIRONAMENT_VARIABLE. Your header is only the text.

    • If the alarm shows down and the server is up there are two options:
      a) the command is wrong. If for this that is better to upload the command, so everyone can check it.
      b) the server is up but the bginfo4x TIMER has not expired, so no new data is check. In this case you can low the TIMER value to for example: 60 seconds instead of the default 300.

    Regards.

     
  • Ricardo Maximino

    i´m trying to go for na ping tester. This is what i´ve got by now...

    Alarm VNC Server: X if [ "ping google.com | grep -i bytes | wc -l" -gt 0 ]; then echo "Up"; exit 0; else echo "Down"; exit 1; fi

    the "grep -i bytes" it's because bytes is a word that only apears if the ping is succeed.

     

    Last edit: Ricardo Maximino 2013-12-20
  • Ricardo Maximino

    can you tell me what does the "-gt 0" refers to?

     
  • BGINFO for X and for Windows!

    This line: if [ "ping 195.22.11.35 | grep -i bytes | wc -l" -gt 0 ]
    if "ping succeeds", grep -i bytes outputs at least on line, and wc counts the lines ... so -gt 0 means: if the number of output lines is "greater than zero" ... there is ping so, server is up ...

    regards.

     
  • Ricardo Maximino

    One question, what should i use? ping -c or ping -n?

    Thanks for the help

     
  • BGINFO for X and for Windows!

    -n 4 is ok.

     
  • Ricardo Maximino

    Hey, got some good news. :)

    I was able to get the test working.

    Internet e email: X if [ "ping -n 1 x.x.x.x | grep -w 'bytes=32' | wc -l" -gt 0 ]; then echo "Online"; exit 0; else echo "Offline"; exit 1; fi

    There is only one problema and i think its this:

    LINEFILEALARM="" #To reset the variable. If not, when read a blank line, the $LINEFILEALARM has the old value!!!

    When the test is "Offline" it goes to the Alarmheader and it doesnt go away when the test is "Online".

     
  • BGINFO for X and for Windows!

    Hello,

    What is your exact problem?

    If the test is offline, it must go to the Alarmsection, and go away when the test is online: BUT you must execute BGINFO4X again or lower the TIMER.

     
  • Ricardo Maximino

    the problema is that it doesnt go away when the test i Online

     
  • BGINFO for X and for Windows!

    It works, but you need:

    1- Backtick your sentence:
    [ "ping -n 1 x.x.x.x | grep -w 'bytes=32' | wc -l" -gt 0 ]

    2- Relaunch BGINFO4X

     

    Last edit: BGINFO for X and for Windows! 2013-12-23
  • Ricardo Maximino

    the sentence was already backticked. the backticks dont show in the fórum posts

     
  • BGINFO for X and for Windows!

    Hi. Is it better -n 3 (more robust). D0es it work now?

     
  • Ricardo Maximino

    Its the same.

    When "Online" to "Offline" the "Online" line on OUT disapears. but when "Offline" to "Online" the "Offline" line on the ALARM doesnt disapears.

     
  • BGINFO for X and for Windows!

    On my environament, it works perfect. From offline to online , offline dissapears from the alarm section.

    Have you restarted BGINFO4X?

    Regards.

     
  • Ricardo Maximino

    Hello, hope you guys had a good Merry Xmas! :)

    I´ve just reinstalled BGINFO4X and it still doesnt cleans the Alarm line.

    Here are the changes i've made on the files:

    IMMODE.CONF -

    CORPORATEWALLPAPER="NO"
    WINDOWS_GET="reg QUERY \"HKEY_CURRENT_US.... remove last sed

    BGINFO4X.CONF -

    IMALARMOUT="ON"

    OUT.CONF -

    Comment everything less the IP and Gateway lines.

    ALARM.CONF -

    Internet e Email: X if [ "ping -n 1 x.x.x.x | grep -w 'bytes=32' | wc -l" -gt 0 ]; then echo "Online"; exit 0; else echo "Offline"; exit 1; fi

     

    Last edit: Ricardo Maximino 2013-12-26
  • BGINFO for X and for Windows!

    Hello,

    Thanks for the example. You are right: there is a bug.
    Next release will have the software update.

    Regards.

     
  • Ricardo Maximino

    Great. Will the next release launch in January?

    Many thanks

     
  • BGINFO for X and for Windows!

    I will try it.

    Regards.

     
  • Ricardo Maximino

    Hello,

    The problema with the alarm not going OFF still persists in the new version :(

     
  • BGINFO for X and for Windows!

    It works, but the functions must be between the blocks

    YOURFUNCTIONS

     
1 2 > >> (Page 1 of 2)

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.