Networking :: Reset NIC Stats Using C
Apr 12, 2010I wrote a small kernel module which essentially resets the NIC counters and a small user space program to ioctl this.
View 1 RepliesI wrote a small kernel module which essentially resets the NIC counters and a small user space program to ioctl this.
View 1 RepliesA small "mom and pop" WISP would like to provide account usage information to customers.Basically, when a person connecting to the WISP's web site is a customer with an IP address from within the WISP's subnets, a link would appear on the web page where customers could read total bandwidth usage (daily, weekly, monthly, and yearly totals and averages) and public IP address. Information could include the top five bandwidth URLs visited; graphs or charts of usage; and usage during specific periods, such as business hours (8AM-5PM), evening hours (5PM-10PM), night (10PM-8AM), and weekends (10PM Friday-8AM Monday).
The WISP has installed cricket (http://cricket.sourceforge.net) and rrdtool (http://oss.oetiker.ch/rrdtool). The next trick is to grab and format the data for customers.I'm not looking for answers like "look at xyz package." Helpful responses will include a rudimentary outline to solve the problem. That is, "xyz package" might indeed be what the WISP needs, but some guidance how to use xyz is needed to move down the road.I have no experience with this type of thing. I appreciate responses from people who are experienced.
I'm unable to reset using either the reset option in gnome shell or the command using a terminal. When I select it the shell exits and displays the graphic "exploding" and then it just sits there. Shutdown works fine; just no reset. Any ideas? I've installed from the DVD. I booted the live CD and it resets just fine so I know it's no my hardware
View 1 Replies View RelatedThis is a very trivial thing, but when I SSH into my newly updated 10.04 server, the stats of the server are displayed on the screen twice. How can i fix it to just display once? This is what it is doing.Quote:Linux xxxxx 2.6.32-21-generic-pae #32-Ubuntu SMP Fri Apr 16 09:39:35 UTC 2010 i686 GNU/LinuxUbuntu 10.04 LTS
Welcome to Ubuntu!
* Documentation: https://help.ubuntu.com/
System information as of Tue May 4 08:41:22 EDT 2010
[code]....
I didn't setup our old system but that server has since been retired due to hardware failure, but we have some new webervers, and a new postgtres database server in place which I need monitoring. Some items include database size, transactions per second, io stats, memory monitoring, or as the DBA put "anything I can get". We had used CACTI in the past for these items, but I didn't do the setup and sondering if that is what is recommended, or something else. I am looking at groundwork open source which include nagios, etc. but figured I would consult the uforums since all these servers are running userver 9.x and 10.x .
View 3 Replies View RelatedJust wondering if there is a way to show the stats of the hard drive(s) in the computer mainly the current read and write transfer rates. Similar to the network graphs that show the Download and Upload speeds, but concerning the hard drive(s) in the computer. I know you can monitor the hard drive temperature, but I haven't seen anybody monitor the stats for the hard drive.
View 7 Replies View RelatedBelow is the print out of requests, with the website address "#.com". The requests are listed in the order in which they appear on the stats page. What does it mean?:
Code:
#.com/
#.com/?Mode=debug
[code]....
I am on Fedora 13, and have a Radeon HD 3870 graphics card. Using the standard open source graphics driver. I am doing some video editing and watching some large movie files (5gb+) so I would like to see if my graphics card is actually doing anything to help. I'm up against a brick wall though - I can't get the GPU usage, memory, or temp. It should do something through GPU hardware video decoding with motion compensation etc. But I can't tell if it doing anything because I can't find anyway to test it.I've enabled direct rendering in mplayer but I don't know if it is doing anything as I have no way to test.
View 2 Replies View RelatedAm I able to know how much data I received and sent till date since my MINT 9? I wanted to know is there method that counts total stats of upload and download since I installed My linux...System monitor is good for only one session..Once you restart the PC all gone.....
View 1 Replies View RelatedI'm planing to write a bash script that will make some web stats reports and I'm stuck on beginning because I don't know how can I read a directory content, put everything in a variable, compare the variable value with current date and go further.More specific ...
I have /var/apache/log/. Here I have access logs on date ( like access.log.24.06.2010.gz and so on ).
How can I do to automatically zgrep (in a bash script) last day .gz ??
I'm working on an application used for backup/archiving. That can be archiving contents on block devices, tapes, as well as regular files. The application stores data in hard packed low redundancy heaps with multiple indexes pointing out uniquely stored, (shared), fractions in the heap.
And the application supports taking and reverting to snapshot of total storage on several computers running different OS, as well as simply taking on archiving of single files. It uses hamming code diversity to defeat the disk rot, instead of using raid arrays which has proven to become pretty much useless when the arrays climb over some terabytes in size. It is intended to be a distributed CMS (content management system) for a diversity of platforms, with focus on secure storage/archiving. i have a unix shell tool that acts like gzip, cat, dd etc in being able to pipe data between applications.
Example:
dd if=/dev/sda bs=1b | gzip -cq > my.sda.raw.gz
the tool can handle different files in a struct array, like:
Code:
enum FilesOpenStatusValue {
FileIsClosed = 0,
FileIsOpen,
[code]....
Is there a better way of getting the file name of the redirected file, (respecting the fact that there may not always exist such a thing as a file name for a redirection pipe).
Should i work with inodes instead, and then take a completely different approach when porting to non-unix platforms? Why isn't there a system call like get_filename(stdin); ?
If you have any input on this, or some questions, then please don't hesitate to post in this thread. To add some offtopic to the thread - Here is a performance tip: When doing data shuffling on streams one should avoid just using some arbitrary record length, (like 512 bytes). Use stat() to get the recommended block size in stat.st_blksize and use copy buffers of that size to get optimal throughput in your programs.
how to install webalizer and configure it to push stats for multiple domains?
View 6 Replies View RelatedI need help figuring out why my resolv.conf keeps changing to this, causing me to not be able to access the outside internet and only the local network.I thought I fixed it by getting rid of the loopback interface and adding in the eth0 interface in /etc/network/interfaces URl...And then things would work temporarily, and eventually the nameserver in resolv.conf would get reverted again.
View 1 Replies View RelatedI'm still kind of a linux newb, so I might just be missing a little bit of knowledge here, but I've been having some real problems getting my machine to connect to my wireless network under Ubuntu 9.04.
Here are my basic specs:
Intel Pentiumâ„¢ 4 CPU @2.66 GHz
1.5 GB RAM
3 HDDs: 1 40GB Maxtor internal, 1 320GB WD internal, 1 160GB Maxtor USB external.
OSes: Windows XP Home Edition (on Maxtor internal drive) Ubuntu 9.04 (on WD internal drive)
I don't think my video card would make any difference, so I won't list it on here...
Anyway, what happens is I try to connect (I select the network SSID from the pull-down list in the NetworkManager panel menu), and it seems to connect okay to the router, but I can't get out to the net. I can pull up a terminal and ping the router's address, but I get a "Destination Host Unreachable" message. It's as if, to the computer, the router isn't even there on that level, but it can still somehow connect to it.
Now, here's the strange part. If I reset the router from another (Windows) computer on the network (specifically, the one with a wired connection to it), then I can connect just fine and I can get out to the internet.
Even if you don't know specifically, but have some good ideas as to what might work, that's fine too. I hate having to do this every day, as it affects everyone's internet connection. Granted, it's not like I'm in a strict business situation with tons of machines and multiple access points, but there are 3 of us in the house and we all share internet access from the same router (as I'm sure most people do), and I feel kind of guilty having to interrupt everyone's connection, if even only for about 30 seconds just so I can get a net connection under Linux.
Windows connects to the router/internet just fine, btw. No problems there. I'm also using a NetGear WN111 USB wireless adapter, with the Windows drivers under ndiswrapper.
I'm trying to set this open-nic-dns (69.164.208.50) as default (instead of 192.168.2.1 - router-ip). So if I try to edit /etc/resolv.conf to this nameserver - but if i restart it's 192.168.2.1 again.
View 3 Replies View RelatedI have an Eee PC 701 4G, and some time ago I disabled its wireless NIC in the BIOS to save energy. Now I've come to need it working again, but I can't re-enable it, because it always goes back to being disabled after I boot the eeebuntu installed on the machine. If I just enable it in the BIOS, reboot and go into the BIOS setup again, it's still enabled, but if I let the OS load it'll get disabled. I'm really at a loss here, how do I find out what's wrong? Could it be Ubuntu that does this?
View 3 Replies View RelatedI've happily been using rdesktop to access my MS Vista desktop from Ubuntu (Hardy) for a few months until a couple of days ago when it stopped working. Now if I try connecting I get the following:
[Code]....
I don't believe anything's changed on the client (Ubuntu) side. The Vista box is occasionally connected to a corporate intranet via VPN and it was after such a session that rdesktop stopped working, so perhaps a Windows group policy was modified during the session. I've checked the basics - can ping 10.1.1.2 from Ubuntu, can access port 3389. Have deleted ~/.rdesktop and ~/.tsclient.
Digging around the Vista client I noticed in Control Panel > System Properties > Remote that in the Remote Desktop sub-panel the Allow connections only from computers running Remote Desktop with Network Level Authentication setting is enabled and that the other two are greyed out. Now, I don't know whether this setting has been changed but I suspect that it might be the problem.
Unfortunately, I don't know enough about Windows to know how or even whether I can change this setting to Allow connections from computers running any version of Remote Desktop (less secure) I've poked around the group policy editor (gpedit.msc) but no joy.
I seem to have somehow mangled my my Ethernet and wireless's connection to the outside world on my Ubuntu 10.04.1 machine. I was trying to get a static local IP, and that worked great for a few days, until I lost all Internet access completely. However, I can connect to my router on my wired connection - but not the wireless.
You can see what I did here: http://ubuntuforums.org/showthread.php?t=1600784
Now, I just want everything to work as it did when I installed Ubuntu 2 months ago. How can I reset Network manager back so that it just works? I realise that don't need a static IP, it can only be 2 IPs, as I have 2 PCs only.
Or is there some better way to manage my networks? I'm not the best when it comes to those.
Is there a way of resetting all of the network settings to standard, as if a fresh copy of ubuntu had just been installed? The resulting discussion trouble-shooting the OP's specific problems were detailed and informative, but failed to answer the fundamental question:
View 7 Replies View RelatedI'm running Debian server 5.0.6 and the latest stable version of Apache. I am hosting a website and it will stop responding after an unknown amount of time. In order to make the website work again I have to run /etc/init.d/networking restart. The server is running a static IP address and is not resetting when the website goes down. I don't know where to start looking.
View 4 Replies View RelatedI am running Ubuntu (Karmic) and did the command: "sudo apt-get install ssh", In an attempt to download, install and setup OpenSSH. This installed both the client and server and during setup actually brought the daemon up and running as well. I then attempt: "ssh <myusername>@localhost" and it prompts me with a password. I enter the password, hit enter and immeditaly see the following results:
Read from remote host localhost: Connection reset by peer. Connection to localhost closed. I'm fairly certain that it is not on the client end as I can connect to other machines through ssh. I've tailed all the logs, messages, dmesg etc and nothing seems to be out of order, or even remotely related to shh or connections etc. My desktop machine had no (as in zero) issues installing and setting up OpenSSH, and connections can come and go as normal.
The other day I was using BitTornado and it was running so slow it was almost unholy. After some research I found out that if the yellow light was on it means I couldn't receive any incoming connections and had to open some ports on the firewall. That, my friends, is not the problem. I tried to manually open up the bittorrent port and did some other things that I can't quite remember but eventually I accidentally killed all bittorrent functionality on my laptop.
Is there any way I can reset my network and ports back to the default settings or am I utterly screwed? I'd really prefer not to have to reinstall my whole OS just to fix my bittorrent or worse, have to download on Vista *shudders*. I'd rather go back to my uber-slow bittorrent than none at all. I've tried everything I can think of, even the godlike might of Google couldn't get me out of this one. Now I am forced to bother you, all because I wanted to see a damn sci-fi film from Switzerland (Cargo[2009]).
I manually reset my router to defaults. Then I changed my router default password, SSID, passphrase, and disabled remote management. I used:
WPA-PSK [TKIP] + WPA2-PSK [AES]
security on the router. When attempting to connect, I use the "WPA & WPA2 Personal" option. This is really strange. I can see the SSID on both my laptops, but I can only connect with one now.
I have a friend that recently moved to Linux. She had started out with Ubutnu 9.04, which was giving her a lot of Issues along with being no longer supported, so I recommend Linux Mint 10 to her, since she wanted something closer to Windows. I instructed her on how to do a clean install. Linux Mint installed ok, but when she was about to set up wireless to get on the Internet, she realised that she had forgotten her password. She called her network (Belkin) for assistance to retrieve it. She was told that Linux is not really supported; however they gave her this address to access the router: 192.186.2.1 from her browser which did not work. So there was nothing further they could have done since she couldn't gain access to the router. She is currently only able to use Ethernet connection to get online.
What could she do to reset her password or gain access to the router? I didn't want to tell her to reset the modem in case it will leave her with no internet and no way to setup her router.
In order to debug a problem, I want to list down as many as possible reasons of a server (SOAP server running on Fedora 10) sneding RST in middle of packet transfer. Please note that in my case, SYN and ACK of initial handshake went through. Server received request from client and started data transfer but then suddenly, server sent RST in between data transfer.
View 4 Replies View RelatedAccidentally I removed the NM Applet from the panel and I am trying to reset it. When I right-click on the panel and "Add to Panel", I couldn't see Network Manager. Hence I couldn't connect to the available wireless network. I am able to add Network Monitor, which is similar to Network manager, but this just displays info about current network.
View 5 Replies View RelatedWhen I try to connect to cvs server this is the error message I get.
I also tried cvs -d server:newuser@localhost:/cvs/CVSROOT login but getting the same result
My repository is in /cvs/CVSROOT
I also tried changing /etc/xinetd.d/cvs with different options, current it looks like this:
And my /etc/xinetd.conf is
cvspserver stream tcp nowait root /cvs cvs --allow-newuser=/cvs/CVSROOT pserver
defaults
# The next two items are intended to be a quick access place to temporarily enable or disable services.
#
# enabled =
# disabled =
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.
View 1 Replies View RelatedI've been having a network problem that I've been able to temporarily solve by rebooting the router, but even that can be shaky at times, and it can sometimes disturb others' internet activites, so I'd really like to tackle this while I can. I had an old thread about this, but it's ancient history by now, and plus which, I've got a bit more Linux experience and patience than I did before.
The basic problem is that NetworkManager will associate and connect to my home wireless network, but a) it won't let me ping the router or anywhere else ("Destination Host Unreachable"), and b) the connection lasts for maybe a couple minutes at most. If I reset the router, however, 9 times out of 10 it will associate and connect successfully and I can get online, but I have to run a constant ping to the router with a 10-second interval, otherwise it drops the connection, unless I'm doing a lot of other heavy network activity.
ping 192.168.1.1 (the router):
Code:
I've tried wpa_supplicant, but this is what I get (it's apparently unsuccessful...? ESSID/MAC addresses censored where necessary):
Code:
The last prompt line is included because I cancelled it myself; it didn't abort on its own. If left unmonitored, it basically keeps doing this over and over, with no visible network activity at all.
With NetworkManager, I can keep selecting the network's ESSID over and over, and it seems to reconnect, but I still can't ping out anywhere. I'm using a Netgear WN111v1 wireless adapter with ndiswrapper and the Windows drivers. I have no idea what the chipset is, and I doubt that Linux drivers exist for it, even if I knew what it was. The router is using WPA2 security (hence my trying wpa_supplicant)
lsusb:
Code:
ifconfig wlan0 (while connected; IP/MAC addresses censored where needed):
Code:
ifconfig wlan0 (while not connected; IP/MAC addresses censored where needed):
Code:
Code:
I only include this for format checking purposes. The commented out "psk" is the actual text passphrase, while the uncommented one is (presumably) a hex representation of the same key. Is this correct? I've never done this with wpa_supplicant before, I've only used NetworkManager (which is a pain in the @$$ because it requires X to run, and so it disconnects any time I log out/back in ).
Is there any hope of getting my wireless connection permanently working, so that I don't have to reset the router every time I need to reboot or log out/back in?
I want to know if the file "named.stats" exists in bind9 under solaris 5.8?
View 1 Replies View Related