I have a small question.We use a backup program, that start an sepparat process with the name SIDB.When the server get an shutdown command. The normale back-up process is stoped. But the SIDB is not stopped correctly. But the shutdown proces should wait till the SIDB proces is stoped, and then proced with the shutdown process
I have a certain process (or processes) and I want to wait for them to finish before launching another one. Do I have to make a while loop checking the process for this task or is there a ready command for it?
I have a doubt about signals in C programming. I have done this little program to explain it. It creates a child process with fork and, when the child ends, receives the SIGCHLD signal and wait for its termination.Ok, quite easy, BUT when I execute this code the SIGCHLD signal is received twice, first as an error (returns -1) and the second one to finish the child process.I don't understand the meaning of the first received signal. Why is it generated? Is the code wrong? (if you add the SIGINT and press Ctrl+C during the execution it also receives two signals instead of one)
I read recently that, if I install the 10.04 RC on my laptop I dont have to worry about reinstalling the 10.04 'official' version that comes out on the 29th.
Core 2 Duo E4600 2GB DDR2 RAM (1 stick) Intel ICH10R based motherboard (tried an ICH9R aswell) 4-port SATA controller (PCI Sil 3114) O/S: Ubuntu Desktop x64 10.04 LTS (using 'desktop' because I like having a remote desktop)
The Storage Setup Disks: Assorted selection of 9 disk. 750GB, 1000GB and 1500GB Seagate and Western Digital disks. The disks are joined through a standard LVM2 configuration. I don't know the LVM term, but normally you'd call it a JBOD setup. On that LVM device, I've put a cryptsetup device, made with the LUKS tools (aes-xts-plain 256) On the cryptsetup device, I've created and mounted an EXT4 partition.
All in all, a completely standard LVM2 and LUKS setup, running EXT4. After a reboot, I proceed to unlock my cryptsetup encryption device, and then mount the EXT4 partition. All is well, the mount is accessible and everything looks fine. I then try to send a file to the mount, via Samba. After a few hundred MB written, the I/O wait goes berserk. It stays at 50% (dual core setup remember). The system becomes unresponsive to network commands (can't browse samba) for about 5-10 minutes. When it finally responds, the I/O wait is gone and everything is now fine. I can write and read hundreds of GB's of data without any issues at all. I can benchmark and stress all disks perfectly fine and no logs are showing disk errors.
I tried monitoring my disks with 'iostat -d 2' while the I/O wait was happening, and there is some slight Blk_read/s activity on 1 disk at a time. First for example /dev/sda is showing a little Blk_read/s acitivty, then it jumps to the next disk, and when every disk has show that slight Blk_read/s activity (500-800 or so) the problem is gone and the I/O wait is no more. I've tried changing motherboards, switching disks around on the controllers, checking individual disks, replacing disks and I've tried different versions of Ubuntu. The problem however persists. I could see it being a network issue, possibly a driver issue. But since the NIC is a standard RTL8111 on-board it seems unlike that the problem wouldn't be more widespread since this NIC is litterally being used everywhere. I did change my motherboard, so a faulty NIC seems unlikely twice in a row.
How do I create a command to launch a program and then have the terminal wait for a specified time and then move on to the next command?I'm wanting to create a startup script, and I need program B to wait until program A has finished loading up.
I applied all updates to my Kubuntu 10.04 installation, and shutdown and went to bed. Booted up this morning and found: [code]...
This error is returned if the module load command is used before loading a Multiboot kernel. It only makes sense in this case anyway, as GRUB has no idea how to communicate the presence of location of such modules to a non-Multiboot-aware kernel. lets re-install GRUB. So I booted up my live CD, and ran:
Same error. So I started looking around, and most complaints of this particular error seem to be dual boot environments, which I found rather odd, as I have never dual booted this machine.....
I'm having trouble with a bash script. Does anyone know why this doesn't work?
Code: nautilus ./ & wait $!
I'm writing a script which will extract a series of .rar files, present the extracted files to the user in nautilus so they may modify them, then when the user closes nautilus, the modified files are packed back into the archive.
I've installed both Fedora 15 x64 and Fedora 14 x64 on an HP Proliant DL380 G4 with the HP SmartArray SCSI controller, 2x146GB UW320 SCSI drives.The server was running RH v4 with a hardware RAID 1 with uptime of 400+ days with no issues.I broke the HW RAID and made 2x volumes and software RAID. I have another identical server with 4x 146GB UW320 SCSI drives with Fedora 12 x64 and SW RAID, so I figured 14/15 should be the same process.What happens is the server runs great for a while, but when I leave it for a few hours, it becomes non-responsive. I've re-installed 15 and 14 multiple times now and also installed NRPE, which shows load increasing to the point to where the server is non-responsive. It hits high load levels (as reported by NRPE). The load levels appear to be increasing over time. Such as last night:
log off at midnight, load average 0/0/0 2:03 am - WARNING - load average: 9.91, 8.85, 6.75 3:03 am - WARNING - load average: 16.91, 15.86, 14.47
I use this machine as a samba server with one small IDE hdd for system and one large SATA hdd (1.5TB) hooked via 4xSATA PCI card. The machine has 1.5GB RAM, and is also to run 2 ktorrent clients inside two Xvncs.The problem is, that even when ktorrent is doing nothing I observe A LOT of hdd activity to the point where movies or even mp3s stored on this server played via samba on a windows machine "stutter". E.g. smplayer will repeat 5 second piece a few times before moving on to the next piece... and it goes on for a good 10 minutes, once it starts.Even browsing directories is slow to the point where it takes 5-20 seconds to show the content in Total Commander (equivalent of Midnight Commander for windows).I am not sure how I can track what is really happening. Why would ktorrent clients create a massive I/O when there's virtually no traffic to/from them? (I have total of 1kB/s down and 10kB/s up while taking the masurements below).Or is there something wrong with the hdd? I had to send back the first one I got, it had plenty of bad sectors (this one does not though, as far as I can tell no data loss occured, just performance sucks).Here's some diagnostic data, please let me know if there's anything else I should check.
I've some file with .sh extensions that runs some softwares.Now,how do I stop running that filesI know we run the command ./start_tomcat.sh to start the apache.Is there any command to stop that file/process or is it just kill the process to stop the process
I'm running home server on Debian stable with DHCP, DNS, Mail, VDR, Filesharing and my Weatherstation as main services. The filesharing is used to mount homes at clients. The machine features an Athlon BE-2300, 3GB RAM, GB-LAN, 1TB and 1.5TB SATA HDD plus HDDs for backups. Mainboard has an NVIDIA chipset with
Code: nVidia Corporation MCP65 SATA Controller (rev a3) The primary disks are running in RAID1 + LVM.
The application I am using writes a report file (ascii), but I am not able to print it, because from inside the application I have no access to the shell and so cannot invoke any printing command (lpr, lp, ...). Is there a tool/daemon which waits for a file in a given directory, takes it, and sends it to a printer?
I am trying to learn C++.I implemented a simple archive program, and I am in a situation in which the user is prompted by a menu to make a choice.So I have some cout instruction to illustrate the possible choices and then
int choice; cin>>choice;
and everything works fine.I introduced this code in a "while" loop that checks wether the choice made by the user is valid or not:
bool check=true; int choice; while(check) { cin>>choice; if(the choice is valid) {...;check=false} else cout<<"please make an other choice" }
What is happening is that if by mistake the user introduces a character in place of a number, the loop repeats indefinitely because the program, when it get to the "cin" instruction, does not pauses to wait for a new input.
I am facing the following issue. My application runs perfectly in red hat linux(32bit, 64bit physical m/c and 32 bit vmWare m/c) and in one version of centOS(32bit physical m/c - don't remember the version:Sorry). However when I am running the same application in CentOS 5.4 (64bit version) I face the following issues -
a. the application gets stuck in the conditional wait even though the signal is sent after the application has moved to conditional wait. b. vsftpd service start fails from within the application even though the service starts and stops peroperly from console.
I'm using bash script now,and I want have a script that can do like this: first ,tell me it will shut down ,and then shut down.My script looks like this:
#!/bin/sh /usr/bin/curl $stop_page shutdown -h now
I have a scenario where I want to monitor at disk performance (cpu and memory also if possible) on a RHEL 5 server functioning as a NAS. I have several machines that backup content to this server via scheduled cronjobs and I'm curious to see if the machine is hitting a bottleneck under load.I attempted to setup cacti on one of our LAMP servers and had a miserable time due to running PHP 5.3 and deprecated function issues.Can anyone recommend an alternative keeping in mind I have only very basic experience with SNMP?
The goal of the script is the following:Whenever I leave my house, my wife comes to my computer to check her mails (She has two computers of her own but they have a dangerous operating system, so they have been banned from the internet).She shuts down qbittorrent so as to download all her mails, and she forgets to execute it again on 98% of the times. End result: my computer is sometimes turned on for 10 hours doing absolutely nothing.I had therefore two choices: a) get on my wife's nerves until she gets the problem or b) write a bash script.If you are married, you will understand that bash scripts are easier to deal with than spouses.Ergo, I wrote the following script:
I'm writing a script that needs to spawn 2 or more processes and wait for their return status. I have a method to do this by waiting on each process individually like this:
Code: Select allrandom: nonblocking pool is initialized and Code: Select allPM: Starting manual resume from disk etc.
When everything is ok boot took around 20seconds. But when this problem occur it can take around 5 minutes. It occure during normal boot, but there are some information about resume from hibernation in log. But I didn't hibernate it. And hibernation doesn't work reliably so I removed uswsusp because I tried to fix hibernation with installing uswsusp first.
My laptop: MSI EX600X-033Sk (C2D T5250, Nvidia 8400g, It has firewire, usb2.0, ...)
I tried to google stuff like "Jessie slow boot", "Stack on random: nonblocking pool is initialized" etc but I didn't found any solution.
Here is few parts of my kern.log:
Code: Select allDec 2 21:27:57 MSI-EX600X-033SK kernel: [ 1.950232] sd 0:0:0:0: [sda] 468862128 512-byte logical blocks: (240 GB/223 GiB) Dec 2 21:27:57 MSI-EX600X-033SK kernel: [ 1.952800] sd 0:0:0:0: [sda] Write Protect is off Dec 2 21:27:57 MSI-EX600X-033SK kernel: [ 1.955190] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 Dec 2 21:27:57 MSI-EX600X-033SK kernel: [ 1.955218] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
I've run into a situation where when performing a pxe/preseed install the system boots up into the install without issue, getting a dhcp address, then the installer begins to configure the network and it gets to where it request a dhcp address and it instantly fails the install stating that we are either not using dhcp or it's slow.
I've added d-i netcfg/dhcp_timeout string 600 to the preseed file but it doesn't seem to be honoured here since it doesn't wait 600 seconds before failing. I have 2 other identical systems that install using the same preseed file but the installer completes as expected. This system has no issues installing centos just debian fails. I did try, once the install failed, to switch to the console and run udhcpc and the server received the address reserved for it.
Is there a method to force debian installer to wait a bit longer for the dhcp server besides what I've already done?
I recently installed OpenSuSE 11.4 including WebYast base system with all available modules. Status shows everything works fine. But the update module has some problems. It displays 21 updates, three of them security and 18 important. By clicking on any of the install buttons the mesages say please wait and then updating while the update time depends on the size of the file. It finishes and goes back to the list of updates without any error message. But after that never shows up any changes or messages that the update has actually installed. Since about ten days the list always remains the same.
I work as a part-time consultant developing webpages, both back end and front end.When developing a back end application I'm using a server running ubuntu server edition to host the application while I'm developing it.The problem comes when I want to upload my changes to the server, now I'm using Dropbox both on the client and the server, the problem is that sometimes I have to wait over a minute for the changes to be downloaded (when I'm working out-of-home that is) so I'm looking for a better alternative. My options seems to be:Some open source version of dropbox which syncs directly to my server (haven't found anyting that sounds viable though)
Mount my server via some protocol (NFS, SSHFS etc)
Push changes manually via FTP, git, svn or something else
I'd like the sync to be as transparent as possible, meaning I'd like to do as little manual work as possible.The client I'd like to connect runs either OSX or Ubuntu.The ultimate solution would be to use NFS + VPN though that would be alot of work to set up and also I don't like the security in NFS (matching UID's doesn't seem very secure to me)