General :: Speeding Up Script By Opening And Closing DB Connection Just Once?

Jan 21, 2011

I have a script which takes a file as input and reads it in while loop cuts the name of table and stores in a variable opens DB connection and queries for rowcount in that table closes the connection reads another file and then follows step 1 through 4 till EOF is reached. Now this script is taking longer to execute maybe because the DB connection is opened and closed each time.

My scripts is:

Code:

#!/bin/ksh
cat logcountOP | while read LINE
TBLName=`echo $LINE|cut -d "-" -f1`

[code].....

I was thinking of changing this.I want to open the DB connection just once and then query it for all tables and then exit.

View 3 Replies


ADVERTISEMENT

Debian :: Cd Tray Keeps Opening And Closing?

Aug 11, 2010

I am running squeeze for a couple of months now

And suddenly my CD tray keeps opening and closing I believe it started after the latest upgrade (I dont remember which packages aptitude picked up)

So is this a bug in squeeze or a bug in my CD tray

View 2 Replies View Related

Ubuntu :: Closing And Opening Ports On Schedule?

May 26, 2010

how I can set up something to automatically open port 119 at 10pm and close it again at 3am..

View 9 Replies View Related

Ubuntu :: Fire When Opening And Closing Windows

Aug 25, 2010

I've seen videos on ..... where it looks like the window burns when you close it. How do you get it to do that? they say its in compiz but I've looked everywhere and haven't found it. [url]

View 3 Replies View Related

Ubuntu :: Gnome-panel Has Gone Berserk - Keeps Closing And Re-opening?

Feb 20, 2010

I have an older Gateway P4 computer running Ubuntu 9.10. I had removed the nm-applet from the systray because I wanted the system to have a static IP. That was several months ago. Today, unthinkingly, I tried to re-add the icon by going into System -> Preferences -> Start-up Applications. I put check in the box next to "Network Manager", then re-started my system. However, when my system came back up, instead of the Network Manager icon, I had two System Audio icons in the tray. One was actually for the audio; the other one just said "Notification Icon" when I put my mouse over it. Again, without thinking, I clicked on "remove from panel". That's where my problems have begun. As soon as I did that, the top and bottom bars disappeared, then reappeared. Except now they're doing that constantly. My machine has become totally unusable. I did manage to turn it off and re-start it, but it comes right back to doing this again.

I can remotely log in from another system (which is where I'm typing this message from) and see that, according to "top", the "gnome-panel" is running at anywhere from 30 - 50% of my CPU. I can provide any logs or other information necessary since I can access the system remotely.

View 1 Replies View Related

Ubuntu :: Closing Laptop Cover Causes Freeze On Opening?

Nov 21, 2010

I recently upgraded my laptop from Lucid to Meerkat 10.10. Everything was fine until I closed my laptop cover. In "suspend" , I can't come back. I get a black screen with a frozen cursor, and I have to reboot. Not a good situation with a laptop. Is there anything I can do? I prefer Meerkat to Lucid for my laptop except for this one area.

View 2 Replies View Related

Ubuntu :: 11.04: Screen Glitches After Closing And Opening Laptop?

May 8, 2011

since I've upgraded to 11.04 on my Dell Latitude E6400, every time I close the lid and open it again, Ubuntu fires up but the screen itself is totally messed up, it's just random patterns all over the screen. The laptop is locked, so I can type in my password, hit enter, and once I'm logged in again the screen is perfectly fine, so the system itself works, only the display is the problem

View 5 Replies View Related

Ubuntu :: Screen Become Grey After Closing Then Opening Laptop / Sort It?

Jun 26, 2011

When I close my laptop and open it the screen become grey and blotchy with almost an argyle pattern. This has only started happening after I configured the usb ports to work in my VM. My startup screen also says something about a usb problem, and S for skip and M to manually fix it but I have had no problems with my usb. Oh except for my computer won't start

View 2 Replies View Related

Ubuntu Multimedia :: Graphics Seem Very Sluggish Doing Things Like Opening And Closing Windows, Popping Up Menus?

May 25, 2010

I've just installed kubuntu 10.04 x64 and I'm slowly working through lots of little niggly problems that I'm having getting it all set up.My graphics seem VERY sluggish doing things like opening and closing windows, popping up menus etc.I have an Athlon II 250 3.0ghz processor, 2GB RAM and onboard graphics ATI HD2100 (740G chipset).I tried to get the proprietary graphics driver installed to see if that made any difference but it wouldn't recognise the onboard graphics, a bit of googling seems to suggest they have actually dropped support for this model?After removing the proprietary stuff it seems even more sluggish than it did before.

View 3 Replies View Related

Ubuntu Networking :: Remote Desktop Connection Closing After A While?

Jul 7, 2010

Does anyone know what could be causing a Remote Desktop connection to a 10.04 box to be closing after some period of time? I have three systems all running 10.04 with Remote Desktop enabled. I'm using UltraVNC on Windows 7 to connect to them. If I open a connection and leave it open for a long time (like overnight, for example), when I come back in the morning, I still see the VNC window but as soon as I click on it, it closes. I can immediately open a new connection to the box but it now shows two active connections. At first I was thinking maybe there's an idle timeout value but given that Ubuntu still seems to think that the original connection is active, maybe the problem isn't on the Ubuntu side but on the UltraVNC side?

View 1 Replies View Related

Ubuntu Networking :: Wireless Connection Lost After Closing Laptop After 9.10 Upgrade

Jan 16, 2010

I have an odd problem in that my wireless connection is okay until I close the laptop. When I open it back up, I'm unable to reconnect. This problem first occurred after upgrading to 9.10. I can reconnect after restarting. I tried several things before breaking down and reinstalling 9.04. After installing 9.04, everything works great. Any suggestions on what is going on before I try upgrading to 9.10 again? I have a Dell D600.

View 8 Replies View Related

CentOS 5 :: Unable To Login Via SSH Error:Server Unexpectedly Closing The Connection?

Aug 2, 2009

am running centos5.3 on a virtual machine and was trying to do some basic hardening and part of it i had to modify the pam.d/system-auth file and from then i am getting a fatal error whenever i try to connect via ssh using putty i am not at all able to login the server with any of the accounts even root also.I am scared unknowingly did i lock the system???how to resolve this issue?

View 3 Replies View Related

Server :: Lots Of "C" (Closing Connection)?

Mar 14, 2011

My server works fine, is never overloaded, but suddenly the Apache workers start to rise up to the limit (450), and are all internal processes "OPTIONS * HTTP/1.0" with "C" (Closing connection). Then the server runs very slow and this can take several hours until I restart Apache.e.g. today:

Code:
0-0 24789 1/7/7 C 0.10 3980 0 0.0 0.01 0.01 ::1 my.server.com OPTIONS * HTTP/1.0
1-0 24790 1/2/2 C 0.03 3989 0 0.0 0.02 0.02 ::1 my.server.com OPTIONS * HTTP/1.0

[code]....

View 13 Replies View Related

Ubuntu Networking :: Connection Lost On Opening Webpages - Server Not Found

May 10, 2011

On a school network the Windows and Mac computers connect to the internet with no problem. The Ubuntu(10.04) computers are connected and work on the internal network but have major issues going out of the building. I can get to one or two webpages to open and the connection dies...Server not found. Ping within the network and there are no lost packages, if I ping outside many lost packages.

We are using SonicWall and think it could be blocking...but why only Ubuntu? This is the same behavior for Firefox and Seamonkey. It's also the same for the thin/fat clients and standalone units. I did try a fresh install with no effect. The internet actually works on the one machine with ubuntu 9.10. I brought a machine home and it connected to the internet with no problem.

Two things I can think of that would of caused this are:
1- we keep getting windows about missing applets, someone may have clicked delete
2- I connected a server to run fat clients w/ LTSP and discovered my server and the schools were handing out the same ip's.

View 2 Replies View Related

Ubuntu Networking :: Port Not Opening On Wired Connection, Fine On Wireless?

May 30, 2011

I'm fairly sure that this is an Ubuntu issue, as I've tried this on my windows computer with success.I'm running a minecraft server on my laptop, previously over a wireless connection but the data rates were too slow. On a wired connection, however, the server starts up and runs like normal but the port is not open when accessing from the network's public IP. I tested this with canyouseeme(.)org. I can get to it from other computers within the network by using a local IP, which to me seems a little strange as it seems to indicate that the port is open on the PC but somewhere in the router it gets confused due to being wired(?). Obviously I've forwarded the ports on the router (BTHomehub 2.0) with both TCP and UCP (it worked over wireless!). Any suggestions as to what might be causing this? I'm stumped.

View 5 Replies View Related

OpenSUSE :: Speeding Up Printing ?

May 20, 2010

opensuse v11.2 linux 2.6.31.12-0.2-desktop x86_64

We have a networked Kyocera cs-3050 printer. When I print something to it, the Print window hangs for about a minute while the printer process queries the printer. This would be acceptable if it did happen EVERY TIME I printed a document.

Is there some way to have the printer driver cache the information instead of asking for it every time?

View 9 Replies View Related

Ubuntu :: Speeding Up Firefox With A Slow SSD?

May 26, 2010

I have an Acer Aspire One A110 netbook. Presently, it runs Ubuntu Netbook Remix 9.10 and Firefox 3.5.8. The A110 is an early model with a slow SSD (solid state drive). Firefox was slow and often paused (froze for a moment). I tried several hacks in the Ubuntu forums and elsewhere to speed up Firefox. Some were not effective at all, some were very technical and at least one produced instability. I tried Google Chrome, which started out fast but turned slow. Emptying browser caches did not fix my problems.

I thought the slow disk must be the problem and moved the browser cache to a dedicated SDHC card. I've since been running with a dedicated cache for a month or two now, have never emptied the cache and Firefox still runs fast. I mean fast enough that it doesn't slow down my browsing (I'm not trying to set world speed records).

The A110 has two SD slots. I have a 16 GB SDHC card in the 'Storage Expansion', which is my data disk. The second is a card reader slot. I didn't want to mess with my data disk. I bought a fast (Transcend, Class 6)

4 GB SDHC, put that in the card reader slot and set up my Firefox cache there:

1. Type about:config in the Firefox address bar.

2. Tell Firefox where your new cache is. For me:browser.cache.disk.enable true.

browser.cache.disk.parent_directory /media/BD2C-8BD5/firefox (I created a directory /firefox on the card)

3. Tell Firefox to increase the size of the cache: browser.cache.disk.capacity 512000 (formerly 51200)

4. Check the cache is enabled, type about:cache in the Firefox address bar. For me it returns: /media/BD2C-8BD5/firefox/Cache

To get the name of the cache directory easily and accurately, open this directory with the File Browser, toggle to a text-based location bar and there it is. Cheap SD cards can be purchased on feebay. Select carefully, they're not all fakes. SDHC Class 6 is fine for a browser cache, handling small blocks of data. Cards only slow down when you do a massive file transfer. 2GB or 1GB should be adequate but fast and small cards are rare. Other memory cards can be used of course, but speeds vary between different technologies.

View 2 Replies View Related

Ubuntu :: 10.10 ... Speeding Up Boot Time

Dec 18, 2010

I'm using Maverick, and I'd like to know some ways that I can make my laptop boot faster. I put the image for the bootchart on my website, just click on the picture and then zoom into it. [URL]

View 3 Replies View Related

Ubuntu :: Speeding Up Flash In Firefox (11.04)?

Jul 13, 2011

Does anyone know any way to speed up flash in firefox on 11.04.I get a lot of lag trying to play games.

View 6 Replies View Related

Programming :: Bash: Speeding Up A Script?

Jan 17, 2011

the bash script we're using to index the music takes FOREVER. A copy of the script is below. We need it to update the database daily, but using find even with the new files added takes over 6 hours.

Code:

#!/bin/bash
mv /var/www/music/index.hold /var/www/music/index.html
before=$(date +%s)
tdy=$(date +%u)

[code]....

View 14 Replies View Related

Slackware :: 13.1 Speeding Up Boot Time?

Jul 19, 2010

Just some things I changed to speed up the boot time.

In '/etc/rc.d/'

rc.acpid
Code:
echo "Starting ACPI daemon: /usr/sbin/acpid &"
/usr/sbin/acpid &
rc.hald

[Code]....

View 14 Replies View Related

Ubuntu :: Fan Keeps Speeding On Dell Studio 1747 10.04?

Sep 5, 2010

I recently bought Dell Studio 1747 with i7 processor. My fan keeps running fast and does not slow even when the load on processor is low or idle. In pre-installed Windows 7, fan works perfectly increasing and decreasing speed based on work load. The noise made by the fan is irritating.

View 1 Replies View Related

Ubuntu :: Slow To Load In Nautilus - Speeding Up?

Mar 7, 2011

Folders with large collections of photos are incredibly slow to load in Nautilus. Sometimes Nautilus goes grey and never recovers. I've tried increasing the size of the thumbs cache but that doesn't seem to make a difference. Ubuntu's Nautilus is also several times slower than Fedora on the same computer and same folders (Multiple OS). I've gotten so that I mainly use Thunar, which loads the same folders in a fraction of a second, though Thunar comes with its own limitations. Is there a way, yet, to make Nautilus behave like Thunar.

View 3 Replies View Related

Server :: Squid3 Transparent Mode Not Speeding Up Internet?

Apr 3, 2010

I've setup Squid3 running on Ubuntu 9.04 64-bit server, and configured it to act as a transparent proxy and setup my router following these instructions: [URL]

Everything works great as far as browsing, but my main goal was to cache large downloads (usually executables) that I download frequently. So I set the minimum to 300KB and the max to 100MB. The problem, though, is the cache is not being used. I can download a file at regular speed on one computer, and then try and download it again and it downloads from the internet again, rather than the cache, so the speed is no faster.

Here's my config file:

Code:
#Recommended minimum configuration:
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8

[Code].....

View 1 Replies View Related

General :: Ubuntu 10.04 LTS Not Closing Down?

Jun 17, 2010

Several times now my PC with Ubuntu 10.04 LTS installed wont close down. I click on all the appropriate buttons but the system doesn't shut down. I have to press the on / off button on the computer to end my session.

View 6 Replies View Related

General :: Ubuntu 10.04 LTS Not Closing Down

Aug 21, 2010

I have been using Ubuntu 10.04 LTS for several months and recently the system has stopped closing down cleanly. It starts okay and runs just fine, but when I come to closing down it doesn't do anything after I've clicked on the shut down button. The same happens with the restart button. I have been closing the system by pressing the power button on the front of my tower. I have no idea as to why it won't close ... I haven't installed any extra software, so I guess it's a system problem. Closing down by pressing the power button cannot be doing the OS any good, so I could do with a fix ASAP on this one.

View 8 Replies View Related

General :: Phasing In Closing Eclipse?

Jul 1, 2011

This is gopal,I am phasing problem in closing emulator in linux.After completion of successful execution if i am trying to close the emulator it wont close only choice is to force quit.

View 1 Replies View Related

General :: Vps With Putty Closing, Or Freezing?

Apr 30, 2011

I recently purchased a dedicated server and have been having trouble with putty. I have been using the server to try and host the game called minecraft. Hosting the server is not a problem however. What is the problem is being able to exit putty without stopping the server. I looked this up, and it sayed to create a screen. I did that after installing screen. I then created a screen, ran the server, then tried to disconnect using the ctr-a-d.However only two things happen when i push the buttons. The majority of the time the window just closes, along with my server stopping. The other thing that happens is putty just stops. I cant type in anything, but I am still notified when I try to close putty.

View 3 Replies View Related

General :: X Freezes When Closing Window ?

Mar 8, 2010

Since the incedent described in this thread:[url]

X just freezes whenever I close a window, I have to kill X when that happens. For some reason it doesn't do that in TWM, though.

View 14 Replies View Related

Fedora :: System Monitor Not Opening / Thunder Bird Opening But Not Showing Any Folder Including Inbox?

Nov 20, 2010

i am using Fedora 14. Once system get hanged during opening a video file so I had to restart the system by pressing restart button. But after restarting there are few problems appearing like system monitor not opening and Thunder bird opening but not showing any folder including inbox.

---------- Post added at 04:54 AM GMT ---------- Previous post was at 04:42 AM GMT ----------

Looks like SElinux has stopped working

View 3 Replies View Related







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