Ubuntu :: Shell Script Using Bash / Get The Date Of The Process Takes Longer Running?

Mar 29, 2010

I need show the number of process per user, and after the date of the oldest process per user also.

With "ps -eo user | sort -u" i get all users that are running any process. And with "ps U username | wc -l" i get the number of process that the user "username" is running.

But how can i merge both commands for do what i need? Like a FOR or something like that. There is any method of make a FOR using the list that i get with the first command?

And then for show the date of the oldest process.. with "ps U username | sort -k 4" (4 is TIME field) i can show the process of the user "username" sorting they by time. But how can i get the date of the process takes longer running?? I can get only the time, but no the date.

View 9 Replies


ADVERTISEMENT

Slackware :: KDE Takes Longer And Longer To Load

Sep 19, 2010

I experience this since kde 4, but it never really was that bad because once in a while on updating kde I also deleted the .kde folder in my home-folder and everything was fast again.

But I haven't done this for a while now and kde take really long to load. Is there any folder to clean up there without deleting the whole .kde-folder and loosing all my settings again?

View 14 Replies View Related

Ubuntu :: Execute Bash Script After Running Process Finishes?

Jul 28, 2011

I have a computation going which takes a long, but uncertain, amount of time. I have another computation which needs to be run, but _after_ the first one is done. I won't be at the computer at that time to manually start the new process. I've done some Googling, and I found how to delay execution by a specific amount of time (e.g. "start process x in exactly 8 minutes from now), but that isn't quite what I want to do. Essentially, I'd like to tell the shell, "When process #nnnn finishes running, then start process x". Is there a way to do this?

View 6 Replies View Related

General :: Bash Shell Script To Check / If Empty Files Are Being Created & Start Process

Jun 25, 2010

I have an Ubuntu server in which a file is dumped every hour and a new file for the next hour and the process continues. If there is any problem due to which the creation of file stops then empty files are created every minute till the process is killed & started again. I need help to make a shell script to check if the empty files are being created and then kill the process and start it again.It would be a great help if anyone can help me regarding this.

View 9 Replies View Related

General :: Process Billions Of Small Files Using Bash Shell Commands With Limited Memory?

May 26, 2010

I need to process billions of small files using bash shell commands with limited memory size (256MB). If any of those files contain certain "keywords", the file will be removed. I tried with command:

find . -type f -exec grep -i -l -H "keyword" '{}' + | xargs rm -rf

where all files are located within the current directory. But the command above failed in "out of memory".

View 1 Replies View Related

General :: Bash Script - Check Process Is Running, If Not Start?

Feb 7, 2010

I am using Sphinx search on my webserver and it quits after a certain amount of time leaving my search page broken.Here is a bash script that I want to run every 10mins via cron:

Code:
#!/bin/bash
if pgrep searchd | grep "[0-9]"

[code]...

View 24 Replies View Related

Software :: Running A Bash Or Shell Script Before Slim?

Jun 8, 2011

Is it possible to run a bash or shell script BEFORE I load slim. This is to do a bit of configuring and file moving before the system actually boots and just generally for a play about!Im wondering if its possible in the innittab file to change the following part:

Code:
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
# Example lines for starting a login manager

[code]...

View 2 Replies View Related

Ubuntu :: Udevd Takes 2.8 Times Longer Than It Should?

Aug 20, 2011

Running 10.04.3 on my rig specs in signaturethis happened after i tried oracle virtulabox 4 trying to get unity in itbefore i installed it udevd took about 2-2.5 seconds now it takes 7 seconds (it takes less than 1 second in my virtualbox)i still could not get unity in it i reverted back to my 3.1.6 virtualbox and udevd is still slow BEFORE:AFTER:i have removed all the junk i could find left over from virtualbox 4 /etc/rc{0..6}.d/{K20vboxballoonctrl-service,K20vboxdrv,K20vboxweb-service,S20vboxdrv}/var/lib/update-rc.d/{vboxdrv,vboxweb-service,vboxballoonctrl-********* -> boards are apparently not letting the post that rightfrom what i have been able to find out about udev it it does stuff with kernel eventsis there a way i can clean up udev/few what it is doing and remove what ever junk got in it it appears to be timing out IMO i have been looking for a solution for over 24 hours at this point if i have to replace udev with a manual version so be it as long as i have a app that can generate itfor the record my virtual 10.04.3 boots faster then my main install on a ssd as a result of this and that is just sad a install can boot faster on a 80 Mbps than a 240Mbps drive i should be able to boot to the login in about 5 seconds after posti know 5 seconds is not much time but percentage wise it is about 50% of my boot time

View 5 Replies View Related

Ubuntu Installation :: Booting Up Takes Longer Time After Upgrade

Jun 2, 2011

Upgraded to 2.6.32-32-generic, it takes about 20 seconds after login at boot up; previous version only takes about 13 seconds. They are at the same environment and service status.(ubuntu 10.04)

View 1 Replies View Related

Ubuntu :: Firefox Process Takes Forever To End?

Jan 14, 2010

I'm running 9.1 and Firefox 3.5.7 with a few addons (better privacy, ghostery, cookieculler, adblock, personas) on a HP 8710p laptop with 4gb of ram.I use it to browse the internet at work, and I have it up for about 8-9 hours every day, during the course of the day I will open and close tons of tabs. At the end of the day when I'm getting ready to leave, I close out of firefox, and it takes one of my duo core processors all the way to 100% and sit at the top of my processes in my Conky for 5-10 minutes before it finally closes. I've been googling for a couple days and have yet to come up with anything,

View 3 Replies View Related

Programming :: Displaying Process Id In Shell Script But There Is No Such Process?

Nov 9, 2010

I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh Code: #!/bin/bash

result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
echo $result
if [ "$result" == "" ];

[code]...

View 4 Replies View Related

Programming :: Calculate How Many Nanosecond The Process Takes

Apr 10, 2011

ı need to calculate how many nanosecond the process takes . must give the same value every time (c++) ubuntu 10.10 my system information:

*-cpu
description: CPU
product: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
vendor: Intel Corp.
physical id: 400

[code]...

View 6 Replies View Related

Fedora :: GNOME - Shell Takes Too Much CPU.

Jul 26, 2011

I'm using F15 and I have big problem. Sometimes GNOME-Shell is taking too much CPU, and my computer is slowing down. This is "top".

Code:
[kuba@Kuba-fedora ~]$ top
top - 16:08:18 up 2:05, 2 users, load average: 0.45, 0.49, 0.43
Tasks: 159 total, 3 running, 156 sleeping, 0 stopped, 0 zombie
Cpu(s): 29.2%us, 2.8%sy, 0.0%ni, 67.1%id, 0.5%wa, 0.0%hi, 0.4%si, 0.0%st

[Code].....

View 1 Replies View Related

Fedora :: Stuck With Bash Shell / Changing Default Shell To Tcsh?

Mar 14, 2010

I want to change my default shell to tcsh. I used

Code:
usermod -s /bin/tcsh username
command as given at url

But if I open a new shell, it is still a bash shell.

How do I make my default shell as tcsh?

View 6 Replies View Related

OpenSUSE Install :: Unmounting Filesystem At The Shutdown Process Takes Ages

Jul 11, 2011

when I am pressing the shut down button inside kde I receive this nice black screen with the green status messages indicating what was done successfuly. At the unmounting file systems though I have to wait for a 20-30mins duration to finished. I have two or three network shares but even a timeout would not take more than 1 min to appear.

View 6 Replies View Related

Programming :: Bash-shell-like Less Functionality In The Python Shell?

Jun 25, 2010

Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?

Example:

Code:

>>> import subprocess
>>> help(subprocess)
...
[pages of stuff to read]
...

I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.

View 4 Replies View Related

General :: Date And Time Of A Process When It Was Started?

Mar 19, 2010

Centos 5.4 64bitWould like to know when a particular process was started.1.Quote:ll -d /proc/4014/dr-xr-xr-x 5 mysql mysql 0 Nov 28 07:34 /proc/4014/2.Quote:ps -o pid,lstart -p 4014 PIDSTARTED 4014 Tue Nov 17 23:10:13 20091) Which one should I consider?2) why do both have such a difference?

View 1 Replies View Related

Ubuntu Installation :: Error 29: Disk Write Error Then Trying Again Windows Seems To Boot But It Takes Much Longer

Aug 17, 2010

i finally decided to updgrade from Hardy Heron to Lucid Lynx. for this i made a backup of my old install, then i couldnt find my Lucid CD so i used a Karmic one to partition my old ext3 to ext4. There were some errors but after trying a few times it worked. Installed Karmic, rebooted (worked fine), downloaded all updates - (did NOT reboot to let updates take effect) and upgraded to Lucid.

Everything went fine so far. Now when i try to boot into Lucid the system hangs, i've also got a windowsXP partition on there so i tried booting that, first grub tells me Error 29: Disk write error then trying again windows seems to boot but it takes much longer than it should and seems to hang.

Then i tried Karmic and Lucid LiveCD (which i found in the meantime) none of the LiveCDs make it to boot after about 20 minutes. (previously they worked fine)looking at the errors it seems to be something about the harddrive. Why the harddrive would stop the LiveCD booting is a mystery to me but the same messages appear when i select Recovery from the Grub menu so i guess the problem is related.

[Code]...

View 3 Replies View Related

Ubuntu :: Edit .ogg To Where It "takes Longer"?

Nov 9, 2010

How can i edit an ogg to where it "takes longer"?

i was just wondering because i.m changing the login noise, and i.ve gotten everything setup...but i.m reading that ubuntu only recognizes it if it is about 10 seconds long, and the noise i.m using is about 4 seconds...

View 1 Replies View Related

Ubuntu :: Bash Command For Counting Down To A Certain Date

Jan 6, 2010

I would like to write a shell script that displays the number of days, hours and seconds left until a certain date and time. What commands would I use?

View 6 Replies View Related

General :: Write Shell Script That Takes A File Path As Command-line Arguments?

Dec 14, 2010

How can i write a shell script that takes a file path as command-line arguments.and it should report whether the path denotes a file or a directory.

View 2 Replies View Related

Debian :: Running Same Process Multiple Times(from Another Account) / An Instance Of Newsbeuter Is Already Running Error?

Aug 6, 2010

Sometimes I connect to my Debian box from another computer (using SSH on Cygwin or Linux), and once ina while I want to run some console apps. And sometimes some of these apps might complain about "another intance, Error: an instance of newsbeuter is already running (PID: 2496)". Is there a work around for this issue at all(without killing the original instance") ? The reason I do not want to kill the app because there might be 2 users connected to the same machine that might be using the same app.

View 1 Replies View Related

Ubuntu :: Use The Date Command In A Simple Bash Script?

Oct 26, 2010

I am trying to use the date command in a simple bash script as below:

#!/bin/sh
this_date=`date`
echo "The date is $this_date"

This script seems to work only if a surround the command with the `` characters, which I copied from another script. Can anyone tell me why this is, and how I can insert these characters from my keyboard,which only has normal quote and double-quote characters?

View 5 Replies View Related

Ubuntu :: $(date +%k) Acts Weirdly In A Bash Script?

Jul 14, 2011

This might well be a case of "I've been looking at terminals for far too long", but here goes. In a bash script I'm writing I'd like to get the current minute of the day. Since date doesn't have an in-built format string for that, I thought I would do:minute of day = 60 * hour of day + minute of hourHowever, when the clock rolled around to 12 / 0 the value disappears from the variable. Viz:

Code:
hour=$(date +%k)
echo "hour: $hour"

[code]...

View 4 Replies View Related

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

Ubuntu :: OpenShot - Segmentation Fault (Process No Longer Exists)

May 22, 2010

I just installed OpenShot from Ubuntu Software Center. When I want to launch it, it displays nothing, then I try from terminal and I get this:

Code:
OpenShot (version 1.1.3)
Process no longer exists: 15049. Creating new pid lock file.
A new frmMain has been created
Segmentation fault

2 month early I was at Ubuntu 10.04 beta and this problem occurred in : VLC, OpenArena, FileZilla etc. and I made a fresh install in April. I configured Ubuntu and have lots of important files, A fresh install isn't an option for me.

View 8 Replies View Related

General :: Write Shell Script To Check The Modified Date Of A File ?

Jun 17, 2011

I have two linux servers, they are backup together.

1. Server 1 have 3 files with name: file1, file2, file3 in the path: /etc/sysconfig/network-script/.

2. Server 2 have 3 files with name and path are the same as server 1.

- How to make a script to copy 3 files at server1 to overwrite on server2. But before overwrite, this script will check and compare the last modified date of these 3 files(on server1 and server2). if the modified date of file1, file2 or file3 on server1 is newer than 3 files on server2 then overwrite process will do, if not, will do nothing.

- see my script as below: it works find now but just overwrite. not check last modified date.

View 1 Replies View Related

Debian Programming :: Yesterday Date In Bash Script

Jun 22, 2011

I have used "FILENAME="`TZ=$TZ+24 date +%y%m%d`" in a bash script that run in openbsd. What my script does is to changes a file name to "yesterdays date". I tried to use it in a script that runs in debian but it doesnt work. Is there any other command that i can use in debian?

View 3 Replies View Related

General :: Bash - Create Folders According To Date In System?

May 26, 2011

Is there any other short/easier and smarter way to do the following in Linux? code...

I need to use crontab to create folders every day and every month inside /home/abcd/dammi, /home/abcd/harrami, /home/wxyz/dammi and /home/wxyz/harrami. Can anyone help me with this?

View 2 Replies View Related

Programming :: Bash Scripting With File Date Comparison?

Mar 23, 2011

I need to be able to compare a file date with system date and delete files older than 30 days.

the file name is basically
error_log.03222011

of course the extension is the date the file was created.

Oh and before i get hammered I looked everywhere but am unable to make sense of what I found.

View 3 Replies View Related







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