How to detect url in use in a script?

Tags
htop, iftop, shell scripts, sorted, url

Login to Reply

 
Thread Tools Search this Thread
# 8  
Old 1 Week Ago
Dear Rudic,
I added wait $PID before each fi in the script.
Now I can see the active url on terminal with
Code:
ps aux | grep myscript.sh


Thank you for your time
Boris

Last edited by baris35; 1 Week Ago at 11:30 PM..
# 9  
Old 1 Week Ago
Not with the script given in post#1. No background process, no wait ($PID).
# 10  
Old 1 Week Ago
Thanks..
Have just updated.
Removed trap, wait $pid* added.

Log:
Code:
2018-12-10 10:48:00.601 spawn: Executing "/root/tmp/myscript.sh"
2018-12-10 10:48:00.897 spawn: $url1 ffmpeg version N-92392-g16d91b7 Copyright (c) 2000-2018 the FFmpeg developers
2018-12-10 10:48:00.897 spawn: $url1 built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
2018-12-10 10:48:00.897 spawn: $url1 configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-openssl
Program 1
2018-12-10 10:48:02.006 spawn: $url1 Metadata:
2018-12-10 10:48:02.006 spawn: $url1 service_name    : Service01
2018-12-10 10:48:02.006 spawn: $url1 service_provider: FFmpeg
2018-12-10 10:48:02.006 spawn: $url1 Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
2018-12-10 10:48:02.006 spawn: $url1 Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 133 kb/s
2018-12-10 10:48:02.006 spawn: $url1 Overriding aspect ratio with stream copy may produce invalid files
2018-12-10 10:48:02.006 spawn: $url1 Stream mapping:
2018-12-10 10:48:02.006 spawn: $url1 Stream #0:0 -> #0:0 (copy)
2018-12-10 10:48:02.006 spawn: $url1 Stream #0:1 -> #0:1 (aac (native) -> mp2 (native))
2018-12-10 10:48:02.006 spawn: $url1 Press [q] to stop, [?] for help
2018-12-10 10:48:02.007 spawn: $url1 Output #0, mpegts, to 'pipe:':
2018-12-10 10:48:02.007 spawn: $url1 Metadata:
2018-12-10 10:48:02.007 spawn: $url1 encoder         : Lavf58.22.100
2018-12-10 10:48:02.007 spawn: $url1 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
2018-12-10 10:48:02.007 spawn: $url1 Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s
2018-12-10 10:48:02.007 spawn: $url1 Metadata:
2018-12-10 10:48:02.007 spawn: $url1 encoder         : Lavc58.39.100 mp2

Kind regards
Boris
Login to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to detect time drift Green_Star HP-UX 17 06-21-2018 12:52 PM
Script to detect time drift on server Green_Star UNIX for Beginners Questions & Answers 1 05-10-2018 04:13 PM
A script to detect system type dampio UNIX for Advanced & Expert Users 1 01-24-2018 06:02 AM
Help with detect with regex and move script Simplify Shell Programming and Scripting 7 01-19-2017 10:58 AM
Detect current shell inside a script mohtashims Shell Programming and Scripting 2 11-28-2016 10:38 PM
Reading URL using Mechanize and dump all the contents of the URL to a file scott_cog Shell Programming and Scripting 2 02-17-2014 07:32 AM
Bash script to detect nonpingable hosts newbie2010 Shell Programming and Scripting 5 06-02-2013 06:17 PM
Detect if script starts from queue Lord Spectre Shell Programming and Scripting 16 08-16-2012 12:09 PM
Awk: print all URL addresses between iframe tags without repeating an already printed URL striker4o UNIX for Dummies Questions & Answers 18 03-01-2012 06:58 AM
Regex to rewrite URL to another URL based on HTTP_HOST? EXT3FSCK Web Programming 5 12-12-2010 10:53 PM
AWK script to detect webpages from file ROFL Shell Programming and Scripting 2 03-23-2010 09:22 AM
AWK script to detect webpages from file ROFL Shell Programming and Scripting 1 03-22-2010 01:22 PM
how to detect my script is already running rmulchandani UNIX for Dummies Questions & Answers 11 01-26-2009 06:10 PM
url calling and parameter passing to url in script gander_ss Shell Programming and Scripting 1 05-12-2008 10:45 PM
url calling and parameter passing to url in script gander_ss UNIX for Advanced & Expert Users 1 05-07-2008 01:34 PM
All times are GMT -4. The time now is 06:53 AM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.