Networking :: Statistic About Interfaces From /proc/net/dev - File Is Reset When Get Reach More Than 4G Byte
Jun 27, 2010
I have to get soem statistic about interfaces from /proc/net/dev. but statistic on this file is reset when get reach more than 4G byte.I think linux has limitation on this case.
I got across a peculiar problem with memcpy.History:writing a code which do flash/Read functionality for SPI Parts.
Implementation: 1.memory map the Flash chip registers to userspace. - fine 2.Issue block read command 3.Just print the data I got, using the memory mapped address - fine I got the correct data. 4.Copy the data to a local buffer from memory mapped address using memcpy - FAIL
UPDATE: on SUSE 11.3 -32 bit the above code worked perfectly, but on SUSE 11.4 - 64bit , Ubantu, Fedora it failed. I am using gcc compiler obviously. I am using i386/x86_64 OS. Processor: Intel core 2 duo, SNB after step 4 , when I dump the data from local buffer every thing is FF.But step 4, if i implement byte by byte copy using assignment operator, it worked.is there any known bug with memcpy? am I missing anything?
I am trying to read the /proc/net/tcp6 file of a huge server (chat server) for monitoring the tcp6 connection states.
This tcp6 file has more than 26000 lines. For monitoring the server connections, my monitoring tool has to read the /proc/net/tcp6 file quickly in regular interval. Presently it takes minimum 6-7 seconds for reading the whole file.
My tool can able to read the normal file (26,000 lines) less than 1 second, but it is not possible to read the same size of proc file.
I have 2 questions:
1) Why proc file takes more read time than normal file?
2) Is there any way to read the /proc/net/tcp6 file more quickly?
I have a weird issue that I have not seen on any forum. My jaunty on DELL studio laptop seems connected to net, but I can not access any network service (ssh, firefox etc.). But when I connect a cable the cable lights blink as it should be and in wireless connection my wifi light blinks.
It was working 2 days ago without problem, and I have not done big changes recently.I removed and reinstalled network-manager and network-manager-gnome. Nothing changed. I see a message in each restart as follows (when Openafs is starting). I can reproduce it with "/etc/init.d/openafs-client restart"
Code:
ADVISEADDR:error in specifying interfaces: no existing ip interfaces found
I have 3 Interfaces for a different LAN's and when I start one interface the another interfaces goes down.How can it's possible?I configure my ethernets as:
If I try to add a new interface (eth1) to /etc/network/interfaces, I get
Code: * Reconfiguring network interfaces... SIOCSIFADDR: No such device eth1: ERROR while getting interface flags: No such device SIOCSIFNETMASK: No such device
[Code]...
How do I add 2 interfaces and get anyone of them to work, as available ?
DSL modem is a Speedstream 6520 router. All computers work fine via dhcp. I'm trying to setup a small server (print server, ssh & ftp servers). I understand enough of the software part of things to get it going, my problem is setting a static IP on the server box. Every time I set the IP in the /etc/network/interfaces file and reboot, I have no network connection. I can talk to the modem through the browser, but nothing beyond that, not even local computers.
/etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.254.202 network 192.168.254.0 netmask 255.255.255.0 gateway 192.168.254.254
ifconfig shows the .202 address, but box can't get to the outside world, and can't ssh into the box from a computer sitting next to it. If I let it dhcp, then I can ssh into it, and have access to the internet. In the modem, I have dmz set for that address. Wan address is static. I can ssh into it if I let it do dhcp, so I know it can work that far. But if I set static ip, I might as well pull the network cable. I've been beating my head on this for over a week, and I'm lost why I can't get it to work. I even changed the dhcp range on the modem, so the .202 is not in that range. There is no dhcp client installed that I can find. I'm using WattOS beta3, which is a light distro based on 9.04. The computer is an old Dell GX150, integrated nic. I have done ifdown and ifup eth0, still no happiness. Doesn't seem like it should be that hard, but I'm stumped. DMZ should let everything pass, so don't need to mess with port forwarding and such. I know it works using dhcp.
For my router I need to change Ubuntu server from DHCP to static IP. So to do this I entered: Code: sudo vi /etc/network/interfaces ...and pushed the wrong buttons and exited the session suddenly by mistake. After learning how to use the vi editor I went back but I got a notice that the the last session didn't close properly and that a "swap" file had been created. Anyway, I entered my static IP info, saved the file, and attempted to restart with:
Code: sudo /etc/init.d/networking restart Restart failed and I got a notice that I should delete the /etc/network/interfaces.swp file so I did. Tried to restart again and, didn't get the .swp file conflict message this time, but failed again - this time I got the following message:
which file can setup up my network interfaces? i was able to setup the nameserver using /etc/resolv.conf but I cannot find anywhere to configure the ip and and gateway. I could't find /etc/network/interfaces as you do on Debian
I have a file that stores employee login IDs, names, types, and permissions. Our software reads the information based on byte-columns, so it reads a column as any ASCII character (spaces, letters, numbers, punctuation, etc.). I want to create a web-interface for adding and removing users, and storing the data in a MySQL database. However, if I am creating the files from the MySQL output, I need a way to write to specific column locations in the file ...
User ID: Columns 1-4 User Name: Columns 6-30 Type: 32-40 Permissions: 42-45
I want to use a scripting language, preferably C-Shell, to call MySQL for the data and write the data to the correct columns of the file. I wrote a script that takes the data from the file, and dumps it into the MySQL table, so maybe I can pad the remaining space in the table column to fill with spaces ...
I've got the F13 LiveCD that I was able to boot and use using the "nomodeset" boot option. From the desktop I'm trying to perform an Install to Hard Drive. I've read the Install from LiveCD post regarding the creation of a /boot partition and a / root partition. I've tried creating them without the LVM group and with. But every time I appempt to install I get...
An error occurred mounting device proc as /proc: mount failed: (9, None). This is a fatal error and the install cannot continue.
Hardware is a Sager 8887 (P4, 3.06HT, 60GB HDD, Radeon 9000 graphics adapter)
I'm sniffing network packets in ubuntu, I need to write these packets as raw bytes to memory but libpcap give packets in its special format. how can i save and recover packets in byte format?
At present I have to live with a 5Gb/month data volume limitation. Due to having to monitor this usage, I have been forced to use the software that came with the web dongle - and that means having to use Windows (spit!)
Can anyone recommend a Linux package I could download that readily shows how much data one has uploaded/downloaded over a set period?
I'm I seeing this wrong or is the initrd file in kernel-2.6.27.25-170.2.72.fc10.x86_64 a zero byte file and that's why I can't boot with it( get this "kernel panic not syncing VFS unable to mount root fs on known -block (0,0)" message)
I am trying to edit the file shmmax in proc/sys/kernel/. I want to increase the value. I am using vim to edit it. But when I try to write and close the file I get the following error: "shmmax" E667: Fsync failed Press ENTER or type command to continue
Trying to change permissions on a file in /proc/sys/fs/inotify. The command syntax are:
Code: sudo chmod u+w max_user_watches and the result is:
Code: chmod: changing permissions of `max_user_watches': Operation not permitted Also tried to change it when logged in as root, same results. Parent directory permissions are dr-xr-xr-x, and are the same up the chain. Tried to change the directory permissions to u+w, that didn't work either. FWIW, /proc is part of the / partition, and it has ~600MB free space.
I am trying to read the /proc/net/tcp6 file of a huge server (chat server) for monitoring the tcp6 connection states.
My server's tcp6 file has more than 26000 lines. For monitoring the server connections, my monitoring tool has to read the /proc/net/tcp6 file quickly in a regular interval (5 secs) and process. Presently it takes minimum 6-7 seconds for reading the whole file.
My tool can able to read the normal file (26,000 lines) less than 1 second, but it is not possible to read the same size of proc file.
I have 2 questions:
1) Why proc file takes more read time than normal file?
2) Is there any way to read the /proc/net/tcp6 file more quickly?
I am using RedHat MRG on a standalone intel PC that has 8 cpus. It has 2 Quad cores. I am trying to force some specific persistent tuning on it so that the OS and IRQs are all on one CPU socket and then I can run my Application on the other CPU socket (4 CPUs) using the taskset command.
I have been reading up on this mainly at [url] and having some success. But, I have one IRQ that is not active until my application runs that I want to force it to be on CPU 4.
And so I believe I can do this by setting /proc/irq/default_smp_affinity to 10. But, I do not have such a file on my system. How can I create this file at boot time properly?
I am booting RH 5.4 over network (PXE) with custom initrd.img. I managed to get NFS working and switch root and do normal RH /sbin/init, but as RH boots it complains about /proc/devices missing:/proc/devices: fopen failed: No such file or directoryThe file is indeed missing, even though I'm doing "modprobe dm_mod" before. But still /proc/devices is not created. What am I doing wrong?init script for that initrd.img:
I want to split file foo into two parts, and I only intersted in the first one. But the N bytes in which the first part consists, I want it to be an exact replica of the corresponding bytes of foo. More exactly:
I'm running ubuntu 9.04 and I have set up 2 ip aliases using the /etc/network/interfaces file http://pastie.org/775037 -- when I ping the main address 10.0.2.16, all works fine, same with the first alias 10.0.2.22 -- but I can't reach the 2nd alias 10.0.2.23 I get the following from ping:
PING 10.0.2.23 (10.0.2.23): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 92 bytes from 10.5.0.1: Destination Host Unreachable Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 5400 06eb 0 0000 3f 01 5e81 10.5.0.34 10.0.2.23
My machine's IP address is 10.5.0.34 I can't figure out why I can ping 10.0.2.22 but not 10.0.2.23 -- seems like there is probably some kind of routing thing that I'm missing, but I'm confused how it would have gotten set up for 10.0.2.22 but not 10.0.2.23 -- hopefully someone out there has an idea -- or can point me to references where I might be able to learn how to debug routing issues on a network?
I'm interesting in knowing what processes could be altered to improve performance and functionality on my system. And which process may be the best one to alter
I have a problem reaching some hosts on the Internet, namely newegg.com and djangoproject.com. On the same machine and network connection using Windows 7 the host names resolve properly and I can connect to them. The host names are resolving in Ubuntu, but I cannot connect to them.
I'm using Ubuntu on my laptop but I'm having a small problem. The network is working fine except for the fact that I can't reach anything on my LAN (can't even ping the router), but everything on the outside works just fine. I can even visit my webserver if I type my public IP.
Where should I begin looking for faults?
Here, enjoy some data. I'm using my wlan0 interface, not sure whether eth0 works or not.
Quote:
$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
I have read many, learning linux,apache,samba,vsftp,ssh..etc from this forum but now i am realy stucked and confused. My samba server has always been reached from internal aswell external networks.
I have switched 5 months ago to Telfort network ( i am not sure... ) but as far as i know it was no poblem to connect the samba server with windows explorer everywhere.No i get the only the login screen when connecting from outside the network and when filling in the credentials it just come back with the login screen. I don't have any problems internal when connecting to these shares and supplying the credentials.