Programming :: Variation In Value Returned From Gettimeofday()

Dec 29, 2010

I needed to find the time it takes to execute a for loop... I decided to use the gettimeofday() function and wrote the following code:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sched.h> // for use of sched_setaffinity

[code]....

View 9 Replies


ADVERTISEMENT

Programming :: Output Time In Ms From Gettimeofday?

Apr 23, 2010

i am trying to print the time in ms using the gettimeofday function, but on execution the shell gives: Segmentation fault (core dumped) error and leaves the program.. here is the code:

struct timeval time1,time2;
double time_used1;
//get time1
gettimeofday(&time1, NULL);

[code]....

View 3 Replies View Related

Programming :: <sys/time.h> Gettimeofday Conflict With Eth Socket Sendto

Jun 3, 2010

Whenever I enable gettimeofday in my code, previous working sendto(raw_eth, buffer, ...)

stopped working and Error: Bad file descriptor. the only thing I'm sure is it's not name pollution. Since all the variable defined in main() works if I make the wrap of gettimeofday an empty function.

View 9 Replies View Related

Programming :: Can't Understand The Value Returned By Semctl Using GETPID Option

Oct 18, 2010

I have got a program using semctl(). I cant understand the value returned by semctl using GETPID option and its difference with the actual pid obtined by getpid()as in the following code:

Code:

int semid,retval;
semid=semget(0*20,1,0666 | IPC_CREAT);
retval = semctl(semid,0,GETPID,0);

[code]....

View 4 Replies View Related

Programming :: Operation Canceled - Error [G_IO_ERROR_CANCELED' Will Be Returned

Sep 18, 2010

I do not get what this method is seeking for? Where do i put a string or somethig that its sopposed to find.

[code]...

Seeks in the stream by the given offset, modified by type. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

[code]...

TRUE if successful. If an error has occurred, this function will return FALSE and set error appropriately if present [URL]...

View 2 Replies View Related

General :: Difference Between Xtime And Gettimeofday()

Oct 24, 2010

why there is a difference in the time shown by xtime and gettimeofday ? From what I have read I understand that xtime is not frequently updated and gettimeofday is more precise than xtime.

View 1 Replies View Related

OpenSUSE :: OpenOffice Win/lin Variation?

Jan 4, 2011

I de-crappified a new laptop last week for a friend and set him up with OpenOffice.I had earlier salvaged files from his old PC HD, saved them to my Box. Most of his office files were actually the dreaded M$ Works (.wps)But I tried them and OpenOffice had no trouble, least in Linux that is.I burned his files to a DVD-RW and copied them to his new Laptop. OpenOffice for windows wouldn't have anything to do with the .wps filesStrange or what !

View 6 Replies View Related

Ubuntu Installation :: Variation That Can Be Installed On An USB Stick?

Jan 18, 2010

so i know that i can create a live usb stick, but i dont want to do that. i want a full install of the system on the stick. at the moment i have a 2GB usb stick, and when i try to install kubuntu, i get an not enough space error. thats understandable. but if there is an ubuntu variation that i can install on less than 2GB of space (and optionally run the KDE environment), then please provide a link. if there isnt an ubuntu variation, then please provide something other then Damn Small Linux.

View 6 Replies View Related

Software :: Downloaded The 64 Bit Variation And Then Burnt It And Booted From It?

Jun 12, 2010

I decided to install Fedora today ( from Debian ) so I downloaded the 64 bit variation and then burnt it and booted from it. My partition table before looked like this ( the XXXs of values I do not know ) :

Code:
Number Start End Size Type File system Flags
1 1049kB 10.5GB 10.5GB primary fat32 diag
2 10.5GB 110GB 100GB primary ntfs
3 110GB 111GB 98.7MB primary ext2 boot
4 111GB 320GB 209GB extended
5 111GB 315GB XXXXXX logical ext3 XXXX
6 315GB 320GB 5124MB logical linux-swap(v1)

I wanted to seperate my /home and / (root) partitions in my new system so that in the future, distro-hopping would be easier. I deleted everything in my fifth partition except for my home folder, from which I moved my home folder ( /home/whales ) to the top layer of the partition ( now /whales ).

I then did a yum install gparted so I could shrink partition 5 (now going to be /home) and add another 20gb one for / (root). Unfortunately Gparted spat out an error about the kernel not reading the partition table until reboot ( but first it succeeded in shrinking the FS to 286GB ). I panicked and tried to format p5 to ext3 ( it was ext3 ) but then realised this was dumb before it could 'create the ext3 filesystem' and I cancelled the operation.

I then rebooted, realising I should have done what the error said to in the first place.Nope. The partition was 'empty' apart from lost+found ( which is empty ). Nuts I thought to myself. The filesystem must have been overwritten . I tried a 'rescue' on parted on the command line, but that did not work. So I then removed the parition reference and then tried a rescue, but nothing happened. No output other than progress, and now I am stuck with this layout:

[Code]...

View 10 Replies View Related

CentOS 5 Hardware :: CPU Throttling - Frequency Variation

Jan 12, 2011

I have de Dell desktop (optiliex 755) and i have instal CentOS 5.5 on it. Some informations about the system are:

View 2 Replies View Related

Ubuntu :: Is There A Variation Of Grep To Search Files For Keywords

Jul 10, 2010

I know you can use grep to find keywords in filenames, but is there a variation that can enable you to search the content of the files themselves?

View 9 Replies View Related

Programming :: "Message Too Long" Error Returned By The Function Dn_expand Means?

Apr 2, 2010

what "Message too long" error returned by the function dn_expand means?

The function call I used is as follows:

dn_expand(poutput, poutput + output_space_used, *out_rr, output_qname, 255);

I assumed that the error was due to the difference between the 1st argument and 2nd argument, However, changing the difference to the accepted dns message size (512 bytes) or even to no difference at all did nothing to remove the error.

Further, I am trying to check the output after having first compressed a domain name using dn_comp into *out_rr. This function call is in order to check whether the compression is happening correctly.

View 4 Replies View Related

General :: Nfs :RPC Call Returned Error 101

Feb 23, 2010

i am trying to run an application code in nfs host.but facing the problem as shown below.can anybody tell what the problem could be?

[code]...

View 2 Replies View Related

General :: Pthreads - Structure Can Be Returned With Value

May 21, 2010

I am playing around with pthreads. This program however blows up.

#include <iostream>
#include <pthread.h>
using namespace std;
struct myStruct
{
int a;
string msg;
};

void * myProc(void *arg)
{
struct myStruct* str = new struct myStruct();
str->a = 10;
str->msg ="hi";
return (void*)str;
}

int main(int argc, char **argv)
{
pthread_t mythr;
int status ;
void *retVal;
struct myStruct* m_str;
status = pthread_create(&mythr,NULL,myProc,NULL);
status = pthread_join(mythr,&retVal);
cout<<"Status is"<<status<<endl;
m_str = (struct myStruct*)m_str;
cout<<"retval is "<<m_str->a<<" "<<endl;
return 0;
}

Can a structure be returned by a thread as its return value ?

View 1 Replies View Related

Debian :: Dpkg Returned Error Code (1)

Jul 25, 2015

When trying to install php5 I got the following result. Tried to apt-get clean, autoclean, remove --purge then reinstall the mentioned packages without any success.

dpkg --configure -a didn't get any better result.

Code: Select allsudo apt-get install php5
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Les paquets supplémentaires suivants seront installés :
  libapache2-mod-php5 php5-cli php5-common

[Code] .....

View 5 Replies View Related

General :: Edit All The Files Returned By Find In Vi?

Sep 15, 2011

Something I find myself doing a lot is running a find command and then editing all of them in vi, which looks something like this:

> find . "*.txt"
./file1.txt
./file2.txt
./path/to/file3.txt
> vi ./file1.txt ./file2.txt ./path/to/file3.txt

Is there a clever & simple way to do this all in one command line?

View 3 Replies View Related

Ubuntu :: 10.04 - Blinked Then Returned To Login Screen

Apr 30, 2010

Was playing with a script in /etc/init.d, ran upgrade-rc.d then rebooted. Login scree came up, accepted my credentials, blinked then returned to login screen.

Booted from CD and removed the script from init.d and the softlinks from /etc/rc*.d

View 1 Replies View Related

Ubuntu Servers :: Nfs - RPC Call Returned Error 88

Jun 2, 2010

I recently upgraded a couple of my systems from 8.04 LTS to 10.04 LTS. I had no issues with nfs prior to the upgrade. After the upgrade I am occasionally seeing the following messages:

mspfiles being the share name.

This never used to happen on 8.04. Generally the error "Socket operation on non-socket" points to a coding error. Could this be a bug in the kernel? Has anyone else come across this?

The only other recent reference that I found to the same errors was in this comment on the OpenSUSE bugtracker: [url]

It seems as though it is handling loss of connectivity less gracefully than it did before.

I can't really upgrade any more of my servers until this is fixed as we are heavily dependant on nfs.

View 9 Replies View Related

Ubuntu :: Collect2: Ld Returned 1 Exit Status

Jan 26, 2011

I'm getting the following output when trying to compile my cpp project:

Code:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/walther/NetBeansProjects/CppPlay'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/cppplay

[Code].....

I've seen you guys replying to others about this collect2 error, but all of them had some kind of informative message from the compiler.

View 1 Replies View Related

Ubuntu :: Cant Access Software Repositories - 404 Returned?

Mar 26, 2011

I have a Dell Mini running 10.10 dual booted. Accessing internet through a BT Home HUB version 2.problem solved by making the Wireless setting 802.11 B/G, instead of the BT default), now I can not access software repositories. when I try through synaptic to load Icedtea, or Google chrome for example, I get server not found 404. I was previously able to get software.

View 4 Replies View Related

Fedora :: FC14 - Rt_ioctl_giwscan. 6(6) BSS Returned - Data->length = 890

Nov 4, 2010

On my FC14 in /var/log/message i have a lot of erroe about rt_ioctl ..

[Code]....

View 1 Replies View Related

Ubuntu :: Sub-process /usr/bin/dpkg Returned An Error Code (1)

Jan 14, 2010

I think that my computer crashed one time, while I was in middle of installing some new software, and it seems like it have made "dpkg" confused with itself - it thinks, that I still need to install "Wine", but it is allready installed, so everything is allright. But everytime, when I am upgrading or installing any kind of software, it give me this error (just an error, everything still works and installs fine):

Code:
Setting up wine (1.0.1-0ubuntu8) ...
kernel.printk = 4 4 1 7
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1

[Code]....

Errors were encountered while processing: wine E: Sub-process /usr/bin/dpkg returned an error code (1)

View 6 Replies View Related

Ubuntu Installation :: /usr/bin/dpkg Returned An Error Code (1)?

Mar 19, 2010

I'm tried to install bandwidthd on Ubuntu 9.10 and keep getting the following error.I have been looking around for a while and have been unsuccessful in finding a answer.

HTML Code:
$sudo apt-get install bandwidthd
Reading package lists... Done

[code]....

View 1 Replies View Related

Ubuntu :: Collect2: Ld Returned 1 Exit Status In Cpp Project?

Apr 4, 2010

I am making a project learning about inheritance and polymorphism

it consists of
Account.h
Account.cpp

[code]....

View 2 Replies View Related

Ubuntu :: Wine Post-insall Script Returned 255

Apr 10, 2010

I've installed wine on my laptop and it runs fine. Although it seems something happened while installing it (via apt-get install), because everytime I use apt-get untill then I get the following in my terminal:

Code:

The following packages were automatically installed and are no longer required:

Use 'apt-get autoremove' to remove them.

The following NEW packages will be installed:

View 2 Replies View Related

Ubuntu :: Error: The XML Response That Was Returned From The Server Is Invalid

Aug 30, 2010

i'm runung "ubuntu 10.4" and install "Xampp 1.7.3.a" i have 3 problem in the joomla web installer in step "2:Pre-installation Check"

Code: configuration.php Writable NO

in step 5 : FTP Configuration when i feel ftp setting and click on "verify ftp setting,get this error Code: Error: the XML response that was returned from the server is invalid.

inthe final step when i click "install sample data" i get this error

Code:
Error: the XML response that was returned from the server is invalid.

View 1 Replies View Related

Networking :: IPTables And Routing On Untangle Box - Traffic Not Returned

Aug 20, 2010

I have an Untangle Box - which for those that don't know is a modified Debian Lenny used as a router, proxy, filter and much more - It has three physical interfaces on it eht0 (incoming traffic), eth1 (Outgoing to LAN after traffic filtered), and eth2 (Called a DMZ NIC, as Untangle can be used as a router). There is also a tun0 interface setup by Untangle for VPN (Not using the Openvpn in Untangle because I need bridged a bridged VPN and this is not an option in Untangles offering), a br0.eth setup by untangle to bridge eth0 and eth1 for traffic flow through as it is inline from router to switch and not acting as the router itself, and a br0 interface that I have setup by bridge script bridging eth2 and tap0 to run OpenVPN as a bridged VPN.

The routes on the machine are as follow:
Code:
untangle:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 * 255.255.255.0 U 0 0 0 br.eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 br0
192.0.2.0 * 255.255.255.0 U 0 0 0 dummy0
192.0.2.0 * 255.255.255.0 U 0 0 0 utun
untangle:~#

I don't see a default route listed here, however, I do have Internet connectivity on the Untangle box itself. I also know that by script to bridge the tap0 and eth2 interfaces adds a default route through the gateway on the network that eth2 is connected to. So the lack of a default route is somewhat puzzling to me, I do have the gateway set through the web based admin interface Untangle offers.

The iptables rules are as follow:
Code:
untangle:~# iptables --list-rules
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N alpaca-firewall .....

There was an addition output rule in the alpaca-nat-firewall rule that said DROP outgoing interface eth2, I removed that rule with no change. I can ping out from the Untangle server to the eth2 LAN, I can access resources in the eth2 subnet. But I cannot get any reply from the server from anything either in that subnet or not. If I run iftop I can see the incoming traffic form my ping but the Server sends out no reply. I think this is a firewall issue. I can access the server by connecting to the IP assigned to the eth0/br0.eth interface which is in my main LAN. I am also attaching a crude diagram of the previous setup and the new setup (Previous setup used a different server for my bridged VPN).

Is there a rule I can add to ensure that traffic coming in on an interface goes out the same interface? Do I have a rule blocking incoming traffic to eth2/br0? Do I have one blocking sending out on eth2/br0? Do I have a default rule that is killing the traffic on eth2/br0 and I need to add an accept rule for traffic coming in on eth2/br0? I tried adding an accept rule for traffic coming in on br0, but it didn't work. I tried an output rule, but that didn't work, but I may have been bungling these rules as I do not fully understand the syntax and function and body of an iptables rule. The exact original iptables information before I modified anything can be viewed at [URL].

View 4 Replies View Related

General :: Modify Loop Code (For And While) To Get Output Returned

Jul 20, 2010

Filename.txt

Code:
My First Line
My Second Line
::::While Loop:::
Program:

Code:
while read line
do
echo "$line"
done < Filename.txt
output:

Code:
My First Line
My Second Line

Is it possible to use for loop to get the same output. I have tried executing below code but I get every word of my file being displayed one below above.Is there any way I can modify the for loop code to get the output returned by while loop?

:::For Loop:::
Program:

Code:
for line in $(cat Filename.txt)
do
echo $line
done
output:

Code:
My
First
Line
My
Second
Line

View 8 Replies View Related

Server :: User-specified Malloc Function Returned NULL?

Dec 23, 2010

Our Fedora-ds was down for some reason,And I got these logs:

[23/Dec/2010:18:59:32 +0200] - libdb: User-specified malloc function returned NULL
[23/Dec/2010:18:59:32 +0200] - id2entry error 12
[23/Dec/2010:18:59:32 +0200] - id2entry get error 12

[code]...

View 1 Replies View Related

Software :: E: Sub-process /usr/bin/dpkg Returned An Error Code (1)

Jan 30, 2010

I'm trying to customize my BackTrack4 image so I can use the live disk with my ati graphic card. While trying to put the drivers with the apt-get install ati-driver command, I get the following message:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ati-driver

[Code]....

View 2 Replies View Related







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