This past weekend I had some issues with my ISP.
So for future purpose I'm going to have some logging on my internet so I'm able to attach log files to my complaint email if this issue reoccurs.
Decided to do a simple ping script that runs every 5 or 10 min with crontab
if ping fail write date followed by ping result to pinglog.txt
Everything works except geting ping result into pinglog.txt
Script just prints to terminal.
I have tested the line in terminal and then result prints to pinglog.txt.
Script and pinglog.txt are both in /home/seb/bin
date gets printed into pinglog.txt
123google.com is intended for if to be true
---------- Post updated at 03:52 ---------- Previous update was at 03:42 ----------
Hi,
I have my application and database servers running on solaris. I need to check Db connectivity for a datasource in my Db server.
Please guide me how to do it in solaris env.
Aru (2 Replies)
I want to write a script to check if a unix box say abc.tdc.cin.net can be connected or not on certain port say 22. right know i have to telnet them manually from DOS prompt and if it is successful then isay it is connected.
Also to check Database connectivity I am using tnsping From DOS prompt.... (3 Replies)
So, first and foremost, I'm having issues with my internet connection. Periodically, the connection drops across the network. The fix is simple enough: restart the modem. However, this gets old when the connection dies out every hour.
I can hit my surfboard on 192.168.100.1, and navigate to a... (5 Replies)
Hi All,
I need an automation script to check the connectivity between 2 UNIX servers.
Could anybody please help in this regards?
regards,
janardhan (1 Reply)
How to check connectivity with an external server if I know the IP.
Please note traceroute is not working for me, as it is saying command not found. (6 Replies)
Hi ,
I am able to connect to sybase using the below script ,but i want to check the status of the connectivity like if there is any network failure during downloading the file ,it will come out with exit 1 status .Any help on this ?
# isql database_name db_user_name <<EOF
select date_val from... (0 Replies)
Hi,
I need to check the sysbase database connectivity through the Unix Shell Script. Can you help me on the how to write the script to test the sysbase database connection.
Thanks in Advance
Nandha (0 Replies)
check the connectivity of the DBs through script, script should exit if no connection and display the output as below.
connectivity for DB1 is OK
connectivity for DB2 is OK
connectivity for DB3 is FAILED
for DB in 1 2 3
do
(sqlplus -s... (5 Replies)
Hello,
I have a requirement to check the tcp network connectivity between server it's running on and the list of host's and ports combination.
i have written the below code but it doesn't work, but when i execute the nc command outside the script it works fine.
please help me where i am... (8 Replies)
Hi everyone!
Some time ago, I had to check connectivity with a big list of hosts, using different formats (protocol://server:port/path/, server:port, ....).
I developed a script that checks the connectivity using different commands (ping, telnet, nc, curl).
It worked for me so I'm sharing it... (9 Replies)
Discussion started by: Fr3dY
9 Replies
LEARN ABOUT OSX
script
SCRIPT(1) BSD General Commands Manual SCRIPT(1)NAME
script -- make typescript of terminal session
SYNOPSIS
script [-akq] [-t time] [file [command ...]]
DESCRIPTION
The script utility makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an
interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
If the argument command is given, script will run the specified command with an optional argument vector instead of an interactive shell.
The following options are available:
-a Append the output to file or typescript, retaining the prior contents.
-k Log keys sent to program as well as output.
-q Run in quiet mode, omit the start and stop status messages.
-t time
Specify time interval between flushing script output file. A value of 0 causes script to flush for every character I/O event. The
default interval is 30 seconds.
The script ends when the forked shell (or command) exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-D (if
ignoreeof is not set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. The script utility works best with commands that do not
manipulate the screen. The results are meant to emulate a hardcopy terminal, not an addressable one.
ENVIRONMENT
The following environment variable is utilized by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most
shells set this variable automatically).
SEE ALSO csh(1) (for the history mechanism).
HISTORY
The script command appeared in 3.0BSD.
BUGS
The script utility places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
It is not possible to specify a command without also naming the script file because of argument parsing compatibility issues.
When running in -k mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual
echo logging. This does not work when in a raw mode where the program being run is doing manual echo.
BSD January 22, 2004 BSD