Programming :: Calculate The Amount Of Data Had Been Download?

May 3, 2011

i'm trying to write a program with c socket programming,what i am trying to reach is a program which will calculate a computer's downloaded data from the internet,just to know how much he/she download?

View 1 Replies


ADVERTISEMENT

General :: Calculate Minimum Ext3 Partition Size For Certain Amount Of Data?

Aug 5, 2011

These following ext3 partitions contain identical data. As we can see, the larger the partition size, the more space is required for the same files:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop11 3965777 561064 3199964 15% [...]
/dev/loop19 573029 543843 29186 95% [...]

[code]....

View 2 Replies View Related

Programming :: Write A Script To Calculate The Total Amount Of Installed Memory?

Apr 4, 2011

I am trying to write a script to calculate the total amount of installed memory to use during an anaconda kickscript, so the swap file is created at 2 x the installed memory. I so far have the amount of installed RAM DIMMS but need a way to total them up and produce a varible I can use in the pre section of the install.

Code:

dmidecode -t 17 | grep Size | awk ' { print $2 }'
Output:
2048
2048

Note: on some servers there could be from 1 DIMM up to 16 DIMMS installed so the script needs to be able to handle this. I also can not use bc as it does not exist during the install stage. I am guessing I need a while loop to do this and use expr but do not know where to start for this logic.

View 3 Replies View Related

Programming :: Calculate Data And Make It Into New Column Using Awk?

May 24, 2011

i've been using a awk script to calculate my data... i have 3 files:

file a1.txt:

2
3
4

[code]....

the results were (3.5, 6 and 3) which is pretty easy.. now i want to combine all this into 1 file and each have different columns and called it avg.txt which have something like this in the end:

3.5 6 3

View 1 Replies View Related

Server :: Calculate The Total Amount Of Memory Used By The System?

Jul 15, 2010

I want to calculate the total amount of memory used by the system, Someone please confirm if the below formula is correct.Quote:

((memUsed-mebBuffers-memCached)*100)/memUsed => totalMemoryUsed%
Code:
free -o
total used free shared buffers cached
Mem: 8167004 8115292 51712 0 87680 1444676
Swap: 8388584 3252996 5135588
((8115292-87680-1444676)*100/8115292) => 81%

As per the above calculation 81% of memory is used.Is this correct? and if so Am I running out of memory?what is the limit in % that I should maintain for a better performance?

View 3 Replies View Related

General :: Measure The Amount Of Usb Data ?

Jan 21, 2010

I would like to measure the amount of traffic my webcam is sending. What is the best way to do this? I tried iostat command, but i do not see the webcam traffic back.

View 1 Replies View Related

Software :: See The Amount Of Data Downloaded?

Aug 3, 2010

I am on a limited broadband plan with 4GB download limit per month. Is there any software which can tell me how much data I have downloaded in a particular period of time?

View 1 Replies View Related

Ubuntu :: Everything Freezes When Copying Large Amount Of Data?

May 20, 2010

Well, when I copy large amount of data the other applications than Nautilus freezes until the copy is done...

So, what can I do? Because when backuping some data this is really annoying =/

View 6 Replies View Related

Ubuntu Networking :: Limit Amount Of Data To Be Received?

Jun 30, 2010

I was wondering if there was a Windows or Ubuntu way to limit the amount of data that is able to be sent over the internet between certain times, eg. Between the times of 7am and 7pm can only download 300 MB from the web, when this limit is reached the web is either disconnected or slowed down.

View 2 Replies View Related

Hardware :: Disks Speed Varies When They Have Same Amount Of Data?

Oct 30, 2010

My machine has 4 SATA 2 West Digital 1TB disks. I made 2 partitions on each of them, 500GB for each partition. When I started using them I check their I/O using iozone. The first partition has 100MB/s for read, 70MB/s for write. And the second partition has 80MB/s for read, 55MB/s for write. All 4 disks has the same result.

As I use on, the I/O speed on each partition decrease, to different extend. For example, for the 4 first partitions, the write speed varies from 69MB/s to 56MB/s. And I have same amount of data on each of them, all used 11%.

My guess for this is the disk block allocation policy. This is caused because some disk starts writing from inner location while others writes on the outer edge, even though amount of data on each disk is the same.

View 3 Replies View Related

Software :: Amount Of Data Passed Through A USB Device (from USB Stick)?

Aug 17, 2010

I have a probably kind of unusual problem - when a USB stick is connected to the PC and data is copied from/to that stick, I need to know how much data has been copied. The data itself if not interesting, just how many bytes. I unfortunately don't have access to the program that does the copying, and most of the data doesn't end up on any drive (it just gets read and discarded), so I can't simply check the size of a target directory or something like that. I have had a look at usbmon, but that seems to produce way too much data - the normal case would be around 10 gig of data being read, and I can't have that blown up by a factor of 10 and lying around on the hard drive

View 4 Replies View Related

Software :: Command To Display Amount Of Data Read And Written?

Apr 3, 2011

I know there's a command to display the live amounts of data being written and read to the disk.Like, it tells you how many blocks have been read/written so far to a device

View 1 Replies View Related

Ubuntu :: Script That Changes MAC-address On Network Card When Download Or Upload X-amount Of GB

Jul 14, 2011

Making a script that changes the MAC-address on my network card when i download or upload X-amount of GB. I have been searching around on the web, but I haven't been able to find anything that does that.

View 3 Replies View Related

Ubuntu Networking :: Gui Bandwidth Monitor - Set Up And Just Shows The Amount Of Data Downloaded And Uploaded Per Month

Feb 16, 2010

my isp is putting a max bandwidth in my area and I need to monitor my downloads and uploads per month. Is there anything that has a gui that is easy to set up and just shows the amount of data downloaded and uploaded per month. Also if possible to do a pop up if you set a maximum bandwidth amount.

View 2 Replies View Related

Programming :: Calculate Length Of My Array?

Jun 30, 2010

I want to calculate length of my array, say Unix here.

Code:
[linux1@HMLINUX1 abc]$ declare -a Unix=('Debian' 'Red Hat' 'Suse' 'Fedora');
[linux1@HMLINUX1 abc]$
[linux1@HMLINUX1 abc]$ echo ${#Unix[@]}
5

This should be ideally 4, but somehow it is showing as 5. However, when I am removing the space as RedHat instead of Red Hat, it is working perfectly.

Code:
[linux1@HMLINUX1 abc]$ declare -a Unix=('Debian' 'Redhat' 'Suse' 'Fedora');
[linux1@HMLINUX1 abc]$ echo ${#names[@]}
4

View 4 Replies View Related

Programming :: Bash Calculate The Repeated Lines?

Jan 28, 2010

i have a sorted file with many repeated lines like this:

1ujw
1ujw
1ul1
1us7

[code].....

i need to calculated haw many times each line is repeated, for ex

1ujw 2
1ul1 1
1us7 5
etc.

View 5 Replies View Related

Programming :: Calculate Logarithm In Bash Script?

Dec 12, 2008

I want to calculate log in bash script. I searched but could not find any bash command to directly do it. I am also thinking to send the variable in C program, calculate in C and get the answer back in bash script.But I think it is a long process. as I have to do this

i) gcc -o log log.c

ii) ./log > log_result.txt

iii) then read the result from log_result.txt

View 5 Replies View Related

Programming :: Clock() - Calculate How Much Time Does My Program Run?

May 11, 2011

im trying to calculate how much time does my program run, use very simple script

clock_t end, start;
start= clock();
int i;
printf("initial %d
",(int)start);
[Code]....

but it outputs 0 all the time. cant figure out where could be the problem.

View 2 Replies View Related

Programming :: Calculate The Time Taken For A Sample Program To Run?

Apr 24, 2011

i have the example code below, i want to calculate the time taken for a sample program to run. but i keep getting undefined reference error.

#include <sys/time.h>
#include <iostream>
int main(int argc, char **argv) {
struct timeval startTime;
struct timeval endTime;

[Code]...

View 9 Replies View Related

Programming :: Calculate The Number Of - Necessary - Bits In A Byte ?

Jun 11, 2010

E.g. 98 is represented as 1100010 (number of valid bits is 7)

What is the formula to calculate the number of valid bits in a byte ?

View 14 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

Programming :: Calculate The Blade Offset In Python?

Dec 30, 2010

I'm using pyqt3 for my app and am lost on even how to attempt this task... On a vinyl cutter to have the blade pivot it must be offset from the center of the shaft it's on so say for example a .25mm offset would leave a .25mm unwanted vinyl attachment when the cutting is done. I somehow have to average or extrapolate that .25mm xy coordinate and add it to the hpgl plot file as a PUx,y; command? I have enclosed a simple sample file that has three images in it. In the corresponding hpgl file everything between the PU commands that are starting with PD are the code for that image (star for eg the pu to move to next image and then all PD for the next image and so on, so once the formula or procedure is figured out it can be applied to as many images there are in the file. Placing the new command at the head of each image PD group. Since there are absolute and relative cutters I enclosed the same exact plot for both types as the coordinates on relative can be negative numbers. Only PU and PD commands and a ";" as a command delimiter as sometimes many commands are on one line.The offset variable will come from a spinbox but .25 is good for an example.

View 14 Replies View Related

Programming :: Sudoku - Calculate The Correct Box For A Given Square?

Apr 8, 2011

Im doing a sudoku-solver as a school assigment in Java. It is supposed to solve both 6x6, 9x9 and 12x12 boards.Im pretty much done with my algorithm(brute force), but I'm having a hard time figuring out how to calculate the right Box for a Square. I found this snippet:

Code:

// calculate BoardPos for index, where index is 0..80
void loadBoardPosFromIndex(BoardPos &pos, int index) {
pos.index = index;

[code]...

This works on 9x9 boards, but I really dont get the math behind this, and how I can create a generic rule for both 6x6, 9x9 and 12x12 boards.

View 4 Replies View Related

General :: Get Output Of Text File Containing Account Number, Debit Amount, Credit Amount,date Using Shell Script?

Apr 9, 2011

How to get output of text file containing account number, debit amount, credit amount,date using shell script?

View 1 Replies View Related

Programming :: Awk - Calculate The Number Of Words Containing Letter E In A Textfile?

Oct 12, 2010

i need to calculate the number of words containing letter e in a textfile.

View 9 Replies View Related

Programming :: Write A Script That Will Calculate A Directory Size?

Jan 20, 2009

I'm trying to write a script that will calculate a directory size and if the size is greater than 4GB, it will send out an email. But I am getting the "integer operation expected" error when it tries to calculate the current disk size. Here's my script.

Code:

TO="user@email.com"
SUBJ="Ready for DVD burning on `hostname`"
MAIL="/bin/mail"

[code]....

View 1 Replies View Related

Programming :: Calculate Flash Memory End Address Of A Certain File?

Mar 9, 2011

how to calculate (if possible) the end address of an image file in a flash memory. I'm trying to create a checksum and checkheader function and the info that I got is the file's offset, how many sector it consumes and its size. I kinda need the end address, sad thing is, I don't know how to calculate it.test.img's start address is 0, the size is 0x20000 and consumes 3 sectors.

View 6 Replies View Related

Programming :: Calculate The Minutes Difference Between Two Dates Using The Function Mktime() On C++?

Jul 28, 2010

I'm trying to calculate the minutes difference between two dates using the function mktime() on c++. The dates will be passed to me as struct tm, and I will use this function many many times. The example below shows what I wanna do:

Code:

int main(int argc, char** argv) {
while (1) {
tm date2;
tm date1;

[code]...

I read the mktime() description on c++ reference, searched google... but there is no light

View 4 Replies View Related

Programming :: Can Perl Move X Amount Of Directories

Jan 8, 2010

I'm in the midst of making a perl script and I was wondering if it was possible, to say, have a folder with 20 files in it, then move 5 files out of there, into a new one. I would like to to do this until the original folder has no more files in it, but I'm very stuck.

View 3 Replies View Related

Programming :: Checking Amount Of System Memory?

Nov 8, 2010

I need to allocate a % of the total system memory for a buffer but what is the best method to determine how much memory is in the system? So far the only way I have found is to get the pages of memory:

Code:
long sysconf(_SC_PHYS_PAGES)
Is that the only option?

View 2 Replies View Related







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