Ubuntu :: Limiting # Of Threads Launched By A Script

Mar 6, 2011

I have a script that basically takes a list of IP addresses, and pings them to tell me if each device (Access Point) is online or not. The problem with that is, the list contains about a hundred addresses. Making the problem worse is the fact that using a single ICMP packet per device is not an option since, at certain times of the day, the network is too congested to guarantee that a single ICMP packet won't be dropped, despite the device being up and running. That means I need to send multiple pings per device for about a hundred devices. As you can imagine, doing this sequentially takes a while.

What I want to do is make my script open other threads in the background to ping multiple devices in parallel. The problem with that is - if I simply make each ping command run in parallel, soon there are a hundred background tasks, one for each address, and that consumes a lot of CPU (CPU hits 100% and stays there till the script is done). Is there a way I can make about 10 threads run at a time, and any other threads will queue until a spot opens up for them? Kind of like the token bucket, except when there aren't enough tokens, the main script waits until it can launch more background threads that ping the next addresses on the list.

View 3 Replies


ADVERTISEMENT

Ubuntu :: Every Time Terminal Is Launched It Shows Something?

Dec 17, 2010

After applying 200 line kernel patch alternative the terminal gives some unknown output:

Code:
bash: /dev/cgroup/cpu/user/1171/tasks: No such file or directory
bash: /dev/cgroup/cpu/user/1171/notify_on_release: No such file or directory

Yeah i know that this issue doesn't really mean anything but it's kinda annoying

View 5 Replies View Related

Debian :: Iceweasel Hangs When Launched Sometimes?

Jan 11, 2011

I am running Squeeze (Gnome desktop) and I'm experiencing some problems with Iceweasel. My problem is that sometimes Iceweasel just hangs when I launch it. I can see the cursor blinking 2-3 times in the adress bar and then it just locks up. I have tried a few different versions of iceweasel, both from stable (squeeze though), experimental and now a package from http://mozilla.debian.net/packages/ with iceweasel 4 beta.

All of them behaves the same way. They work for a while and then suddenly locks up when launched. The only way to get going again is to kill the process and delete the .mozilla directory. It is possible to launch the --safe-mode though but nothing with this mode lets me change anything to get a normal session going.' Also, it doesn't matter if I have extensions installed or not, it still behaves the same way with zero of them installed. How would I go about to debug this? If I launch iceweasel from the command line I get no output but I'm sure there is a way to get some more info to work with.

View 6 Replies View Related

General :: How To Log All Processes Launched And Arguments

Dec 16, 2010

I would like to get a log of all processes that are launched with the time that they were launched and the arguments they were launched with. Is this possible in Linux?

View 3 Replies View Related

General :: Get Pid Of Launched Bash File?

Apr 30, 2011

I've created a bash file that calls another bash. And I would like to get the pid from the second file launched, to wait for the file to ends. The second bash file launches processes in background. How can I get the PID from the second bash file?

Here's my code:

Code:

#!/bin/bash
echo "FIRST"
./second.sh
PID=$(echo $!)
wait $PID
echo "CONTINUUING FIRST"

View 3 Replies View Related

General :: Terminal Cannot Be Launched / Sort It?

Feb 1, 2011

I am using Ubuntu 10.10 maverick meekat...suddenly terminal cannot be launched.

View 8 Replies View Related

Fedora :: Music Stops When Skype Is Launched?

Sep 18, 2010

I thought Fedora 13 could mix sound from two output sources..On my asus laptop, when music is playing and I launch skype, music stops.Just like sound stopping if I have a game running in wine.Is there a trick to allow more than one sound source?

View 1 Replies View Related

Fedora :: Make An Application Launched As Root

Oct 28, 2010

I wonder how I can do to make an application launched as root, without having to go to console and run it from there?

View 14 Replies View Related

Ubuntu :: Launched Evolution - Get Back Into The Wizard To Add / Correct The Email Password?

Oct 25, 2010

I am new to the community and have just recently loaded Ubuntu 10.04. I think I made an error when I first launched Evolution, how can I get back into the wizard to add/correct the e-mail password?

View 1 Replies View Related

Debian :: Creating Terminal Launched Applications (Shortcuts)

Jun 16, 2011

Just got a problem that I've spent a few days trying to get around. Basically, what I am trying to do is create launchers/shortcuts on my desktop that will
a) Launch a terminal with root or sudo access
b) Launch an application.
For example, an application I might ordinarily use as a super user or root user is 'hping3.'

Basically, I want to be able to click on the launcher, and have it open up a terminal with sudo access and launch the hping3 application. I've tried messing around with the 'create launcher' function, and entering in a command to be launched in a terminal window, but to no avail (e.g. something like "sudo hping3" or "su && hping3"). How to write up a simple script to launch a terminal with su access and launch a given application?

View 2 Replies View Related

Fedora :: Programs Launched With Xinit Give Me No Sound

Dec 12, 2009

As the title says, when I launch programs using the "xinit" command from the command-line they are unable to play any sounds. I am using fedora 11.

View 4 Replies View Related

OpenSUSE :: Applications Launched From Gnome Menu Are Not Always Visible

Mar 26, 2011

I have a clean install of openSUSE 11.4 64 bit using gnome as the desktop manager. When selecting applications from the gnome menu, randomly the application will appear to not launch. However, if I click anywhere in left, upper portion of my desktop it becomes obvious that the application has launched and is not visible. For example, yast will not appear but clicking in that portion of my desktop causes various windows to appear that correspond to the different options in the yast home screen.

View 5 Replies View Related

OpenSUSE Wireless :: Knetwork Manager Launched Every KDE Boot?

Nov 10, 2010

I've just setup my mother's desktop PC (HP P6510F) which has a wired connection to the internet, with 64-bit openSUSE-11.3 KDE-4.4.4 desktop. Her PC also has a wireless device, so I decided to set that up. I have it working with the internet (using knetworkmanager), but I have to launch knetworkmanager from a terminal each boot, as it is not launched every boot by default.

What is the 'proper' way to have knetworkmanager launched every boot in KDE4 ? (I can hack at this, but if there is a preferred/recommended method, I would rather use that). I suspect no more detail is needed, but in case one is curious: Her wireless is:

[Code].....

View 9 Replies View Related

Debian Multimedia :: Password Rejected When App Launched Via Gnome Menu

Jul 26, 2015

I use Debian Jessie with Gnome.

I have installed Timeshift. Administrative password is requested when I click Timeshift icon in Gnome menu. I enter the password (or paste it to be sure) but it always returns with "incorrect password, please try agian" message. I am sure that I type my password correctly.

I looked at the icon's properties. It runs "timeshift-launcher". I changed it as "gksudo timeshift" or "sudo timeshift" or "gksu timeshift", enabled "Launch in terminal", disabled, but nothing changed. Always same password request window appears and it rejects my password.

However when I run "sudo timeshift" or "gksudo timeshift" command in Terminal it accepts my password and runs.

When I run for example Synaptics via Gnome Menu, password request window is with black background and it accepts my password. However when I run Timeshift, password request window is with gray background and it rejects.

Root password was not defined in my system during installation and I am the only user. I run administrative commands via sudo without any problem.

View 3 Replies View Related

General :: Location Of A Program Running In Terminal - Launched From Panel?

Dec 17, 2010

I am using DreamLinux. I have pinned a program, that runs in terminal, to the launcher in the panel on desktop. The program's executable file (name: feap) is located in /home/User/feap2.2 After I added the launcher to the panel that runs the file in terminal, the program asks for the input file (text file with alot of commands) when run. By default the program accepts the files that are located in the same directory i.e. /feap2.2 , so I placed the input file in the same directory.

However when I run the program from the panel, and give the input file name, it says no such file exists. Then I gave the file name with full path, but problem was not solved. I have tried alot e.g. placed the input file at other locations, but all in vain. I have set all input file permissions to be accessible by User as well. I will be much relieved if someone suggests where to place the input file for the such program running in the terminal launched from panels?

P.S: If I open terminal, go to the directory (/home/User/feap2.2), run the program's exe file, and then give the file name, it accepts the input file and it give results.

View 1 Replies View Related

Programming :: Perl Behavior When Process Launched In `backticks` Crashes

May 11, 2011

I have a friend (really), who is the author of a Perl application that uses backticks to launch an external application. The process reads a largish set of data files, and printing largish amounts of data which is consumed by Perl. Very rarely, the external application crashes. When it does, the Perl script has been seen to hang, and the host CPU usage goes to 100%. The Perl script can be killed and the host recovers.

The question is whether this is predictable/expected behavior, and if it is, is there anything within Perl which can be used to defend against this behavior. I have already recommended the use of the open() form of reading from a child process, but I'm not sure whether that really accomplishes anything. My theory on the matter is that Perl ends up busy-waiting on the child's output, never receiving any EOF, and consuming all CPU. I cannot see how using open() changes that behavior. I am now interested in this problem so I can avoid causing similar behaviors in the future, and just because 'inquiring minds wish to know'.

EDIT: I suppose I should have added that this is on generic 32-bit Linux hosts; Perl 5.8.X

View 11 Replies View Related

Networking :: Limiting Bandwidth Per IP In Ubuntu

Apr 12, 2010

You may have seen some other posts by me about my final year college project. Im implementing a web based network management website. Iv got a lot of the functionality working at this stage but one part is allocating bandwidth.

Iv got an eircom 3mb broadband connection and I want to be able to split this between users. At the moment I only have my desktop and laptop on the network. Im looking for advice on how i can allocate bandwidth with iptables and/or the tc tool in ubuntu.

My website is on an ubuntu virtual machine and written in php. Whatever about running the iptables and tc commands from php I still need to figure out the actual commands i need to use in the first place.

View 14 Replies View Related

Fedora Installation :: NVidia - Desktop Is Freezing For 10-15 Seconds Before Konsole Is Launched

Dec 25, 2009

configuration: $uname -a
Linux perosoft.home.org 2.6.31.6-166.fc12.i686.PAE #1 SMP Wed Dec 9 11:00:30 EST 2009 i686 i686 i386 GNU/Linux
$/sbin/lspci -nn | grep 'VGA|NV'
01:00.0 VGA compatible controller [0300]: nVidia Corporation GeForce 8400 GS [10de:0422] (rev a1)
$rpm -qa|grep kmod
kmod-nvidia-2.6.31.6-166.fc12.i686.PAE-190.42-1.fc12.8.i686
kmod-nvidia-PAE-190.42-1.fc12.8.i686

i have created a shortcut for konsole on desktop, if i click on icon all desktop is freezing for 10-15 seconds before konsole is launched. if i have the same aplication overlapped in taskbar and i click once same thing is happening, desktop is freezing before select menu is appear.

View 7 Replies View Related

Ubuntu Networking :: Limiting When The Internet Can Be Accessed

Nov 30, 2010

I have a teenage daughter that understands Ubuntu, but not so much the terminal, and she does not know the superuser password. Unfortunately, she regularly goes on the Internet during the nighttime and in the early morning. What I am attempting to do is prevent anyone from going onto the Internet during the night (11 PM - 5:30 AM) unless they know the superuser password or a fair bit about the terminal.

I have already tried some commands, however all of them can be bypassed by restarting the computer. ex. sudo ifconfig eth0 down

For additional information on my Internet:

My Internet connection is relatively slow, so I would prefer if the solution does not hinder it any further. It is slow because there is no high-speed in my area, and I am forced to use Xplorenet -> "Fixed Wireless". I do not have a router.

View 9 Replies View Related

Ubuntu :: Limiting Disk Space Usage

Apr 3, 2011

How can i limit disk space usage for one user? Like.. User john123, you can only use 100mb of my harddisk. User jake155, you can only use 250mb of my harddisk.

View 1 Replies View Related

General :: Ubuntu 11.04 - Limiting CPU Processing For Flash App

Jul 26, 2011

I'm using Ubuntu 11.04. I'm running processes that repeatedly spawn Firefox browsers with Flash embedded in the pages. Occasionally the Flash processes (npviewer.bin) spin off and use almost all the CPU power. How can I limit the total CPU usage of all the Flash pieces to no more than 30% of CPU?

View 3 Replies View Related

Networking :: Limiting Bandwith From 2 ISP With Using One Server

Feb 21, 2011

I have 2 ISP where give me IP Public with ISP A (/29) and ISP B (/28). So, I connect this two ISP to unmanaged switch. And from that switch, I take one cable connected to eth0 on the server. (Note : My server have 2 dev ethernet, eth0 and eth1). eth1 will go to the Switch which will go to the LAN.

My Question is : 1. Is this possible to make bandwith control on the gateway server with mode separating International bandwith and local bandwith (my country bandwith)? ie, for my Mail Server I will give the "intl bandwith" only 512 kpbs and for local bandwith with 1Mbps. What a software can I use for this model ?

2. Which model I should to used, with NAT or with Bridging router? That's all for now..

View 5 Replies View Related

General :: Limiting Concurrent FTP Connections - Less Than 10?

Feb 1, 2011

FTP servers I use frequently have imposed a simultaneous connections limit, usually 5-10 at the time. It was no problem under Windows, since Windows artificially limits allowed FTP connections to ~10 as far as I know. But it is a problem under Linux very much since I cannot find how to limit them :/ So far I used these clients: Native FTP client (Places -> Connect to FTP server). No apparent way to limit connections.

FileZilla. Under particular server settings you can limit number of simultaneous connections. Also you can do that globally in Edit -> Preferences -> Transfers. Problem is, it doesn't work, I still keep getting the 530 Sorry the maximum number of clients (10) for this user are already connected. And netstat shows quite a few simultaneous FileZilla connections no matter that I limited them to 1 both in global and local settings.

NCFTPPUT. 10 successful uploads and hi 530. Total Commander under Wine. Same. NetBeans IDE integrated ftp. Same. Some other crapy FTP clients which names I already forgot. Same. OS is Ubuntu 10.04 So, is there any way to force any of these FTP clients to use less than 10 concurrent connections?

View 1 Replies View Related

Security :: IPTables And SSH Rate Limiting

May 20, 2011

I'd like to discourage the SSH bots that try to log into my system (CentOSv5), and among other things, I've changed my SSH port to someting other than 22. As well, I've been playing around with the idea of some iptables rules (note port 22 is used here as example):
Code:
# Allow SSH with a rate limit
iptables -A INPUT -i ppp0 -p tcp --syn --dport 22 -m hashlimit --hashlimit 15/hour --hashlimit-burst 3 --hashlimit-htable-expire 600000 --hashlimit-mode srcip --hashlimit-name ssh -j ACCEPT
iptables -A INPUT -i ppp0 -p tcp --syn --dport 22 -j LOG --log-prefix "[DROPPED SSH]: "
iptables -A INPUT -i ppp0 -p tcp --syn --dport 22 -j DROP
I am *NOT* an iptables expert. What do you all think about the above code snip?

View 4 Replies View Related

Server :: Bandwidth Limiting Per User?

Aug 27, 2010

So: On the VPS / Dedicated Server Linux wich 3 users created. How can I limit bandwidth each in a separate? For example first user speed 1 MB. 5 MB second and third 10 MB. Expect some clear answers. Regards, Silviu!

View 5 Replies View Related

Server :: Limiting A Sub-user's Bandwidth?

Jan 27, 2011

I run Debian 64-bit. I host GameServers on my machine. Yesterday, some corrupt files or error in configurations of one of the game-servers caused my whole system to destabilize. On checking, I saw one of the Gameserver's console giving Net_sendpacket spam errors. I disabled that server and things were fine then. It used up more than 100GB of my bandwidth in just 12 hours.

I deleted the server and copied all the files over again to fix that error. Now I want a prevention to this, if just in case it happens again. I want to limit a sub-user's bandwidth in Linux. Like if I want a user only to use 10GB bandwidth per month + not more than 5MB/second. Is there any way to do it?

View 2 Replies View Related

General :: Ubuntu: Limiting User Account Only To Access His Home Dir?

Feb 20, 2011

I just created new user account, but the new user is able to access all the directories structure (including other's home directories).I'd like to limit the user to access ONLY his home directory (and nothing "above"). How do I do this?

View 1 Replies View Related

Debian Configuration :: Limiting Resource Usage

Sep 10, 2015

Got a few more questions from the Debian Security Howto.

Section "4.11.2 Limiting resource usage: the limits.conf file" page 44

Code: Select allnano /etc/security/limits.conf

At the bottom I get...

Code: Select all#<domain>      <type>  <item>         <value>
#
#*               soft    core            0
#root            hard    core            100000
#*               hard    rss             10000

[code]...

Do I have to uncomment these lines for them to take effect?

View 2 Replies View Related

OpenSUSE :: Limiting Size Of Nscd.log File?

Apr 6, 2010

This is are magic file who kill 20 linux nodes today and.. of course i want to ask - What i can do for limiting size of nscd.log file? i try to find help in man files: nscd and nscd.conf - but nothing about log size. (just paranoia mode with auto restarting.. but this sounds ugly. i need just limit log file size)

View 2 Replies View Related

Server :: Iptables Rate Limiting For Ddos?

Mar 6, 2011

I have about 5 machines that are under Ddos daily and I use rate-limit for Iptables to protect that and it works good.My UDP ports 20100 to 20400 are actually under Ddos so these are the commands I use:

Code:
A INPUT -p udp -m udp --dport 20100:20500 -m state --state NEW -m recent --set --name DEFAULT --rsource

[code]....

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved