Can i run a comand line in multiple sessions at once ?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
But it pretty much kills the RPI and i get undervoltage errors plus no packets are captures on any interfaces.
Is there a way around this, can the command be run in three seperate sessions using different interfaces in each? It's also worth mentioing that i run this command via a python file which is triggered by a custome service i wrote. All works fine with a single interface, i just want to add more.
...kills the RPI and i get undervoltage errors plus no packets are captures on any interfaces.
Is there a way around this...
Quote:
Originally Posted by pan64
undervoltage means you must replace your power supply.
Quote:
Originally Posted by pigsfoot
...what does this have to do with my question
Hmmm, you specificially mention when you try your RPI is killed due to undervoltage, and you ask if there is a way around it. He offers you solution for under-voltage error, apperantly it's a hardware problem. So your response doesn't make a lot of sense.
undervoltage means you must replace your power supply.
Quote:
Originally Posted by enigma9o7
Hmmm, you specificially mention when you try your RPI is killed due to undervoltage, and you ask if there is a way around it. He offers you solution for under-voltage error, apperantly it's a hardware problem. So your response doesn't make a lot of sense.
Your absolutly right, its doesnt make any sense if you only post part of a sentance...
Quote:
Is there a way around this, can the command be run in three seperate sessions using different interfaces in each?
.. which bit of that reffers back to teh undervoltage...
Moving on... and back to teh original question please.... can the command be run in three seperate sessions using different interfaces in each?
Your absolutly right, its doesnt make any sense if you only post part of a sentance...
.. which bit of that reffers back to teh undervoltage...
I quoted the part where you mentioned undervoltage already when you tried something. Look closely, it's there. It was your error report when you mentioned trying something, you get that error, and it kills your RPI. I quoted that part specifically because you acted confused.
Try with new power supply, do you still get that error? Does it still kill your RPI? Cuz obviously you can't do anything useful with dead RPI, so first things first.
But it pretty much kills the RPI and i get undervoltage errors plus no packets are captures on any interfaces.
Is there a way around this, can the command be run in three seperate sessions using different interfaces in each? It's also worth mentioing that i run this command via a python file which is triggered by a custome service i wrote. All works fine with a single interface, i just want to add more.
If that is run on one command line as it appears in the way it is posted then there is a problem with the & between the commands (backgrounding the first 2) but never noting the end of each command with a ; .
The comment about replacing the power supply is very germane to the issue since AFAIK a Pi only has one wifi interface by default and adding 2 more is additional hardware + additional power draw especially when they are constantly active as they would be when running tcpdump. The power supply is only capable of ~3 amps (~15 watts) if using the default power supply. The Pi itself told you it was under powered when you got the undervoltage errors.
Fix the power issue first since it can never be stable if it does not have adequate voltage/power to run properly.
As for your original question:
if you want those to run at the same time with only one terminal interface then change them to something like
My system does not have 'type mgt', although it does have a type indicated by -T and none match mgt. It also does not have a subtype designation.
By directing the output of the command to a file you then can look at the file content to see what was captured and once in the background the command will run without filling up your screen. Three separate processes trying to use the screen at the same time will be a problem.
Last edited by computersavvy; 12-16-2021 at 02:13 PM.
If that is run on one command line as it appears in the way it is posted then there is a problem with the & between the commands (backgrounding the first 2) but never noting the end of each command with a ; .
AFAICT, the OP wants them to be run in background. And ampersand (&) not only puts the command to background, it functions as a command delimiter as well: just as the semicolon (;) does. Another question is how useful it would be to run three tcpdump instances at once. Honestly, I don't know. That said, for that command line I'd rather use parallel as a shortcut:
Code:
seq 0 2|parallel tcpdump ... -i wlan{} ...
or
Code:
parallel tcpdump ... -i wlan{} ... ::: 0 1 2
@OP. Perhaps, kismet / kismet_drone would fare better than tcpdump in this situation?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.