Programming :: File System Reaches 90% Or Over?

Mar 19, 2010

Here is the program for Linux machine. GOAL: User will get notify via email when any File System reaches 90% or over 90% of its used space. User will notify as below:

Filesystem: /bkup
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/backup-BKUP
14G 12G 1.3G 91% /bkup
Large Files:
/bkup/prtlprd6_bk20100312_aft2ndjcr.xml

[Code]....

View 1 Replies


ADVERTISEMENT

Programming :: How Some Websites Hide Exact Location Of File On Their File System

Mar 12, 2010

in case you have been wondering how some websites hide the exact location of a file on their filesystem, just thought i'd share it with the commnity at large in case someone else is looking for something like this.i take no responsibility for how it is used.

View 4 Replies View Related

Programming :: Interact With The File System By Own C Source-code?

Jun 1, 2010

I'm investigating how to copy a file located in my file system into another device. I googled to find a solution for my case but I didn't find anything. My original problem was to find a way to permit my code to move a file into a USB device. I wonder If is there a way to implement the cp command or some mechanism that permits my code to interact with between the file system on my computer and the second one on USB external driver (FAT32) ?

View 3 Replies View Related

Programming :: GNU Make - System Libraries And File Permissions

Jan 27, 2010

I am trying to compile a C++ source file into a static library using make with root privileges (i.e., using "sudo"). However, I "sometimes" get the following compilation error:

Code:
g++ -Wall -g -fPIC -W -c /home/project/ether/src/packet-ethernet.cc
ar -cvq libether.a /home/project/ether/src/packet-ethernet.o
ar: /home/project/ether/src/packet-ethernet.o: No such file or directory
make: *** [libether.a] Error 1

I checked /home/project/ether/src folder to see if packet-ethernet.o in fact does not exist, and saw that it is actually located there, but its owner is "root", which is different from the current user. If I change the owner of packet_ethernet.o from root to the current user using "chown" command and execute make again with sudo, everything seems to be fine.

It may be a coincidence that I recently migrated to 64-bit platform from 32-bit, and then installed libboost-filesystem1.40-dev. After that, I began to experience such errors. I have "never" come across such a compilation error before. Even though I completely removed libboost-filesystem1.40-dev afterwards to see if it causes the problem, nothing changed.

After migrating to 64-bit and installing libboost-filesystem1.40-dev, my application exhibited another "weird" behaviour such that it produced "hidden" files using mkdir() system call, which were previously created as regular ones on the filesystem. Can compiler options that I use cause such problems? Is it possible that libboost-filesystem1.40-dev overwrote some system libraries so that I am getting such errors ?

View 1 Replies View Related

Programming :: Algorithm - File System Block Number For Immediate Read

May 20, 2010

algorithm:breada
input: file system block number for immediate read
file system block number for asynchronous read
output:buffer containing data for immediate read {
if(first block not in cache) {
get buffer for first block
if(buffer data not valid)
initiate disk read }
if(second block not in cache) {
get buffer for second block)
if(buffer data valid) //line 1
release buffer else
initiate disk read //line 2 }
if(first block was originally in cache) //line 3 {
read first block
return buffer }
sleep (event first buffer contains valid data)
return buffer }

Here is an algorithm for block read algorithm. I have problem in
line 1: If buffer data is valid why is it releasing the buffer?
line 2: If buffer data valid why is it initiating disk read. It should have read directly from buffer?
line 3: It should be the first condition as if it is there in cache then it should return it without delay?

View 5 Replies View Related

Programming :: Print The Current Time Of My System With A Batch File ?

Dec 25, 2010

How can I print the current time of my system with a batch file. My os is ubuntu.

View 4 Replies View Related

Programming :: Delete Gaps In Directory In A Ext2 File System?

Nov 1, 2010

Directories(-entries) are in a EXT2 file system
managed in a singly linked list.
Delete files in the directory causes Gaps or holes to appear in
the linked list of the directory.How does a C-source code look like,
which would reorganize this list and remove the gaps or Holes.

View 5 Replies View Related

Programming :: System Administrator Wants To Change The Privilege* Only To Users 1, 2 And 3 To Execute The File /bin/xxx?

May 1, 2010

due to an exercise in Operating Systems I have to do the following: There are 6 users, user1, user2 ... user6 with home directories /users/user1 ... users/user6. User1 to user3 belong to group1, user4 to user6 belong to group2. The System Administrator wants to change the privilege* only to users 1, 2 and 3 to execute the file /bin/xxx. Which are the commands he has to type in order to achieve the previous?*I'm not sure if this is the right translation.What I have come till now is: Code: $ chgrp group1 <name_of_file> but it seems too simple to be right.

View 1 Replies View Related

Programming :: System() Routine Returns: Access: Unix Error (2) No Such File Or Directory

Oct 23, 2010

I am running shell command through C program using system() routine.

I am executing "opcontrol --status" an executable using the this routine and I get the following error. access: unix error (2) No such file or directory

But when I give the complete path to the executable it runs perfectly.

The executable is installed in "/usr/local/bin/" And the path variable has this path.

View 1 Replies View Related

Programming :: Detecting Newly Created Folders / Files On Local File System?

Apr 16, 2010

Using C++, I want to process sub-folders on my home folder sequentially each with a special naming format and containing some binary files in it:

Code:
1/
2/
3/
4/
5/
6/
...

Give above folders, I will process files in 1/ at first, 2/ at second, 3/ at third, and so on.

For some n/ folder, if I realize that n/ actually does not exist in local file system, I do not want to wait for it. Hence I will keep processing (n+1)/ folder, and so on.

However, when processing some (n+m)/ folder, previously not processed n/ folder may have been created on local file system. In this case, I do not want to miss processing it, but somehow detect its creation and process it. After processing n/ folder, I want to continue from (n+m+1)/.

View 5 Replies View Related

Programming :: Saving File Data Using Python In An Embedded System In An Safe And Fast Way?

Apr 19, 2011

I am developing a program in a system where the Linux does not take care of the sync command automatically. So I have to run it from my application always I save some data in the disk, which in my case is a 2GB sdcard. It is true that I can make the operation system takes care of the syncronization, using a proper mount option, but in this case the programm's performance drops drastically. In particular I use the shelve module from Python to save data that comes from a socket/TCP connection and I have to deal with the potencial risk of the system being turned off suddenly Initially I wrote something like that to save data using shelve:

Code:

def saveData(vo)
fd = shelve.open( 'fileName' , 'c')
fd[ key ] = vo
fd.close()
os.system("sync")

But that takes too much time to save the data. Note that I use the sync from the OS every time I close a file to prevent data corruption in the case of the "computer" being turned off with data even in the buffer. To improve the performance I made something like that:

Code:

def saveListData( list )
fd = shelve.open('file_name', 'c')
for itemVo in list:
fd[itemVo.key] = itemVo
fd.close()
os.system("sync")

Thus, first I saved an amount of objects in a list then I open the file and save the objects. In this way I have to open the file just one time to save a lot of objects.However I would like to know if adding a lot of objects before closing the file would increase the risk of data corruption.I known that turning off the system after fd.close() and before os.sync may cause problems. But what about turning off the system after

Code:

fd = shelve.open('file_name', 'c')

but before fd.close()?

View 7 Replies View Related

Ubuntu :: Freezes When Reaches Desktop During Boot

Jan 15, 2010

I tried to test Ubuntu on my dekstop, an HP Pavilion a6223w with an ATI Radeon HD 2400 but as soon as the live CD reaches the desktop, it hangs, no errors, and from what I can tell it isn't running on any restricted drivers. Is ubuntu not compatible with my PC or something? Here's my full spec's:

AMD Athlon 64 x2 5200+ 2.6GHZ

ECS Nettle2 Mobo with Nvidia nforce 4 chipset and Nvidia 6150SE integrated graphics

3GBs DDR2 5300 RAM @ 667 mhz

500GB Sata HD 7200rpm

ATI Radeon HD 2400 Pro PCIe x16

HP Multimedia Keyboard and Logitech USB Optical Mouse

Realtek Onboard HD Audio

I tested it with the latest version of Ubuntu (9.10)

View 4 Replies View Related

Networking :: Arriving Packet (UDP) Never Reaches Process?

Apr 14, 2010

I don't know if this is related to a problem I have run into and posted elsewhere regarding 2 (or more) ethernet ports. But I encountered this while trying to solve the other problem (which I thought was Linux not setting correct routes for 2 interfaces). As suggested by someone when trying to solve the other problem, I switched to using the same IP address (it's a secondary address) on BOTH interfaces. So thus I have configured 172.30.0.13 on both eth0:1 and eth1:1. I am running the NSD program (an authoritative-only name server) listening on port 53 of 172.30.0.13. Some computers are getting the MAC address of eth0 for their ARP requests. Others are getting the MAC address of eth1 for their ARP requests. So this is determining which ethernet port their DNS queries will arrive on.

Those that send their DNS queries to the eth0 MAC address work fine. The NSD process gets the requests and answers them. The answers get back to where the query was sent from. HOWEVER ... those that send their DNS queries to the eth1 MAC address do not work. Using tcpdump, I see that the queries actually do arrive on the server. Using strace, I see that the NSD process never gets them. There are no iptables in effect.

Any idea why the kernel is deciding to not deliver the DNS query UDP datagram to the NSD process? It sure seems that the kernel just doesn't handle more than 1 ethernet interface (at least in the same subnet) correctly. IMHO, when an ARP request is received on 2 or more different interfaces, it should at least answer on both, each answer with the respective MAC address of that interface. It cannot know, and should not assume, any specific physical topology of the network beyond those interfaces.

View 1 Replies View Related

General :: Incrimental Counter - Reaches Its Value Of 10 To Reset To Zero

Jun 23, 2010

i am just starting a ubuntu server and i am trying to learn i have a script that runs ever hour and i would like to put a counter (count=count+) in a line if it is true and also if the counter reaches its value of 10 to reset the counter to zero

View 3 Replies View Related

Software :: Ubuntu 9.10 - Temp Reaches Around 80 To 90 Degrees

Nov 1, 2010

I am using ubuntu karmic kola 9.10. The problem I have been having lately is of overheating of my intel core2duo proc, where the temp reaches around 80-90 degrees and the cpu shuts down after a while and the message from the bios is of thermal trip. Ideally my cpus temp is around 55 deg,the moment when the temp starts to climb and when I run a top command, I see arpwatch taking 100 % of cpu. After googling I came across this.

Code:
[URL]. How can a process which is taking 100 % cpu cause a system to over heat and shutdown in few mins? I have had seen instances where processes taking a lot of cpu but not something like this.

ryan@wsx04:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"

Code:
ryan@wsx04:~$ dpkg -s arpwatch
Package: arpwatch
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 468
Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
Architecture: amd64
Version: 2.1a13-2.1

Code:
ryan@wsx04:~$ sa | grep -i arpwatch
4 292.10re 2.06cp 0avio 5176k arpwatch*

View 2 Replies View Related

Slackware :: COUNT Never Reaches Zero - Algorithm Doesn't Converge

Jun 5, 2010

upgrading my notebook from Slackware 13.0 to 13.1. There are always some tricky things to wrap around when such upgrade times come, but now I think I caught a bug in mkinitrd, if I'm not wrong. mkinitd doesn't return when I run:

[code]...

After some debugging, I found that the routine copy-libs() is stuck in an infinite loop, because the statement "while [ "$COUNT" != "0" ]; do" does hold always (that is, COUNT never reaches zero). This, by its side, happens because the set of libs whose dependencies should be checked against are regenerated integrally after each step, and the algorithm doesn't converge. I could fix the problem adding some code, which removes the libraries found in the iteration "i-1" from the list of files found in the iteration "i". A patch in provided below. This done, I could build my first initrd image for Slack 13.1 and put it to run with kernel 2.6.33.4.

[code]...

View 11 Replies View Related

OpenSUSE Install :: Receive A Signal Until The Boot Stage Reaches The KDM?

Jun 10, 2010

I have the computer hooked up to a TV via HDMI. The resolution of the booting process is set to 1280x720, and then KDM goes to the correct 1360x768.

Sometimes when I boot, the TV does not receive a signal until the boot stage reaches the KDM. I do not know how to reproduce this exactly.

View 3 Replies View Related

Ubuntu :: Script To Shutdown My Computer When It Reaches A Specific Time

May 10, 2010

I have looked high and low for this, but to no avail. I am looking for a script to shutdown my computer when it reaches a specific time (say 10:00). I know about the shutdown command but if I use that I cannot shutdown my computer manually. I would like to be able to shutdown manually AND automatically.

View 5 Replies View Related

Ubuntu :: Error Creating File System: Helper Exited With Exit Code 1: Cannot Open /dev/mmcblk0p1: Read-only File System

May 2, 2010

I bought a new SD card which I intend to put some MP3s on - except that I can't write to it because it tells me the destination is Read Only. No-probs thinks I: I'll just reformat it.

"Error creating file system: helper exited with exit code 1: cannot open /dev/mmcblk0p1: Read-only file system"

Various chmod commands all result in Read-only file system. I tried umount then mount commands, but it couldn't find it to mount once I'd unmounted it using the same /media/ file path (I assume it's the only one).

View 9 Replies View Related

Red Hat :: File System Corruption - Super Block Could Not Be Read Or Don't Describe A Clear Ext2 File System

Jul 12, 2010

My Redhat Enterprise Linux 4 with 6x partitions (/, /boot,/home, /usr, /var, /tmp) of 6.0 GB IDE Hardisk was working quite fine. I decided to create LVM on /home and /var partitions but due to some errors occured and I delete the /home partitions. That's why partition table altered. I then delete 4,5,and 6th partitions (/home, /var, /tmp) partitions and now try to create one by one but following error is coming:-

[Code]....

The Super block could not be read or do not describe a clear ext2 file system. E2fsck b 8193 <device> I have tried following commands,but could not successful:- e2fsck -p /dev/hda7 (where hda7 was created but afterthat it was deleted) e2fsck -a /dev/hda7

View 2 Replies View Related

Debian Multimedia :: Plasma 5 Fails To Start - Progress Bar Reaches About 80% And Then Stops

Aug 19, 2015

After installing the latest upgrades in Testing, KDE will no longer start. After logging in, the progress bar reaches about 80% and then stops. At this point the system is unresponsive, and I have to switch to another VT to reboot.

For the moment I'm using XFCE.

View 14 Replies View Related

General :: Break Copy Process When Folder Size Reaches Its Maximum?

Mar 19, 2011

I have written a script.

#/bin/bash
a=`du -sh /root/samplefolder | cut -f1`
echo $a > testfile

[code]....

The aim of this script is, when the folder reaches 20M then attributes will be set to that particular folder so that no newfiles and folders cannot be created or copied to that samplefolder. whenever i copy a file morethan 20M to that folder its getting copied fully and then the attributes were applied. But i dont want this to happen, when the folder reaches its maximum current write operation to that folder should be stopped automatically with a error.

View 5 Replies View Related

General :: Create A Script When Mailqueue (mqueue) Folder Size Reaches 1GB

Aug 4, 2011

how to create a script when my mailqueue (mqueue) folder size reaches 1GB and sent email alert to my email id.

Once mqueue folder size reaches the sent alert by mail. Because everytime my mqueue folder size increasing.

View 3 Replies View Related

Ubuntu :: Jaunty Live CD Not Booting / Screen Hangs When The Loader Reaches About 10% In The Blue Bar?

May 19, 2009

For the first time, I booted up a Kubuntu live CD on a laptop (850 MHz, 40 GB HD, 256 MB RAM). Earlier releases (< 9.04) boot up fine but it does not. It hangs up right on the splash screen and I can view nothing but a blinking cursor on the console screen. The screen hangs when the loader reaches about 10% in the blue bar. No further information can be provided when there is just a blinking cursor at the console. The CPU shows no activity. The CD boots up fine on other computer. How do I go on installing Kubuntu? Is it a good option to use the Ubuntu Server CD and install all the Kubuntu desktop software on it once it is installed (Server edition is not live disk, and I do not have an alternate install CD)?

View 1 Replies View Related

OpenSUSE Install :: Get A 64 Bit File System To Read 32 Bit File System Drives?

Feb 2, 2010

Have just assembled a new computer and thought I would install the 64 bit version of openSUSE 11.2 in a "Windows free zone". After a hiccup or two I have managed to get a system of sorts running but on trying to copy files from my old computer(via a memory stick) it tells me that Vfat is an unknown file system.On my old computer I am running 32 bit openSUSE 11.2 as a dual boot system with Windows XP and have no problems moving files between the two different file systems.Is it possible to get a 64 bit file system to read 32 bit file system drives and if so how do I do it?

View 7 Replies View Related

Ubuntu :: Convert FAT File System To NTFS File System?

Mar 13, 2010

How to convert FAT file system to NTFS file system via Ubuntu,are there any commands to do this task?

View 2 Replies View Related

General :: Partitioning - Difference Between File System Created By Fdisk And File System Created By Mkfs?

Aug 1, 2011

I'm a little bit confused with partitioning the filesystem in Linux. the difference between creating the file system with fdisk and mkfs (when formatting the disk). I can't clearly tell my problem, so please look at this picture:

View 2 Replies View Related

General :: Generated .exe File From C File - Run .exe File When Linux System Starts Up?

Apr 6, 2010

i have generated .exe file from C file (ie filename.c ) after compiling in linux machine with -O option. I wish to know about how to run that .exe file when linux system starts up ?

View 3 Replies View Related

Programming :: Send Some Data From A System To A Windows System And Vice Versa?

Mar 4, 2010

How can I do some socket programming using which I can send some data from a linux system to a windows system and vice versa. Can we do that using the IO:Socket:INET perl module??

View 10 Replies View Related

Programming :: Implement A System Call For Displaying The System Statistics

Nov 6, 2010

I have been assigned to implement a system call that report the system statistics over all memory which are

Total Pages in Active LRU list
Total Pages in Inactive LRU List

View 1 Replies View Related







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