Programming :: Checking Os And Process State At Run Time?
May 11, 2010How can i check what operating system, i am running on, at run time?Moreover, how can i retrieve that current state of process?
View 4 RepliesHow can i check what operating system, i am running on, at run time?Moreover, how can i retrieve that current state of process?
View 4 RepliesMy laptop keeps saying Checking battery state is that something to worry about? The laptop goes has a black screen on it saying Checking battery state then says ok.
View 4 Replies View RelatedMy brother gave me a copy of Ubuntu 10, since my upgrade from 7.04 to 7.10 screwed up. Installed it easy. But strange problems occur. After a few minutes of starting the system, it enters a command prompt, regarding "Checking batter state" yet my computer runs on an adapter, no battery exists (except the built-in one on the motherboard), and I have to restart my computer.
View 7 Replies View RelatedUpdated from 10.04 to 10.10 about 2 weeks ago and it worked just fine until today. After rebooting, it's stuck at "* Checking battery state" and nothing happens. I've tried with power cord inserted/out and without battery but with no success.
What I did before rebooting was that I tried to fix my iphone tethering problems with the following commands:
And also a system update. And here I am. Anyone knows what could have happened? I'm on a Acer Travelmate 8371.
Every time I try to boot into Ubuntu, it never goes any further than Checking battery state. Once it gets there it pauses for about 2 minutes then goes to and doesn't go any further. I can still press CTRL+ALT+F(1-6) to get to a command line, but I'm kinda n00bish when it comes to the command line.
View 4 Replies View RelatedToday when I went to boot up my computer, it hung at "Checking battery state...". I have never had any problems before this, and have been using 10.10 for several months. The only change I made that I can think of was installing the Wacom Control Panel. I have no idea what to do, and really, really don't want to reinstall Ubuntu unless there's no other option.
View 4 Replies View RelatedI upgraded from 10.10 to 11.04 last night.
The boot process hangs just after 'checking battery state' and I can't reach the login screen.
I can boot in using an older kernel OK.
I upgraded to 11.04 yesterday but when I try to run it now it freezes on checking battery state. I've did some looking in the forums and found this post. [URL] Which in turn pointed me to this page. [URL] I have an ATI Radeon 5450 so I went through the steps for Need to fully remove -fglrx and reinstall -ati from scratch
Now, when I try to start up the screen just goes blank as if I've turned the computer off. I can run the system in limited graphics mode (or whatever it's called) so I have the ability to do some troubleshooting there, but I'm a Windows convert and am pretty hazy as far as Ubuntu troubleshooting goes
I can get to a terminal with it in this state and use a ps aux [pipe] grep acpi and kill processes but how do I get it to resume booting after this? Typing startx doesn't work as xserver is already running on screen zero displaying the never-ending loading screen.
View 1 Replies View RelatedSo much for an LTS release being stable. I try to boot from a LiveCD and it hangs on "Checking battery state..." I searched the forum for a solution but didn't really find anything. This is an old desktop machine with Intel onboard graphics -- nothing too fancy and nothing it should have a problem with. Yet it's not working.
View 1 Replies View RelatedI just installed Ubuntu server 10.04 LTS on Dell Optiplex 380 with gnome desktop.
After setting up Samba, I disable gnome desktop from start up by eding GRUB config file.
Everything works just fine.
But this evening, when I tried to boot my server it hanged for about 3 minute with
Code:
After that come the login. After I inputed my user and password it hanged again for 1 minute than it displayed a message saying
Code:
Login timed out after 60 seconds.
I tried to login agian and again but end up with the same error message.
I was sure i typed the correct user and password.
I am having a hard time installing Edubuntu 10.10 on a Toshiba L30
System specifications:
Toshiba L30-140
Intel Celeron M CPU 410 1,46 GHz
ATI Radeon XPress 200M Series
MATSHITA DVD-RAM UJ-841S
Bootable with CD/DVD only
While installing Edubuntu, I encounter two problems:
Can not mount...
I will reach to the screen to select to install Edubuntu and it will even show the green leds. I push F1 to get more detailed messages. After 2 minutes or so I will have this error message:
Code:
This error appears randomly. Out of ten attempts to boot, 6 times I will get this error message. 4 times I will get to...
Checking battery state ... [OK]
This will advance up to "Checking battery state... [OK]" which will freeze there with no DVD or HDD-Activity visible.
I encountered very many threads on the "checking battery state" issue, but they seemed obsolete to me, since most of them referred to Ibex. Also this is the Edubuntu LiveCD, it has not yet been installed on the HDD.
Nonetheless, for the Checking Battery State problem I have tried solutions for Ibex such as "acpi=force pci=noacpi" and "acpi=off". But it wouldn't work. Some people also suggested changing the graphic configurations, this is ATI however, not Nvidia and the BIOS does not offer the option to change it.
Strangely, the installation has worked brilliantly (with the same dvd) on another computer (some Laptop Toshiba L30), so I don't believe it might be a damaged disk.
Dell Optiplex GX260 (w/onboard Intel graphics) Original install was Ubuntu 9.04. Upgraded twice, first to 9.10, and 2 months or so ago to 10.04. Problem never occurred before version 10.04.
BUG HISTORY: Googling on this problem reveals that it has been around since at least Ubuntu 8.10.
I'll be working away and all of a sudden the entire desktop blows off the screen and is replaced with a console stuck in a loop. The last message I always see in the console is "Checking battery state", then the endless looping begins.
The only way out is CTRL+ALT+SYSRQ+K (kills Xserver, I think) followed by CTRL+ALT+SYSRQ+B (reboots system).
NOTE: If I attempt to restart Xserver, Ubuntu goes into an endless console loop with the same "Checking battery state" message. Does that help anyone figure out what's going on?
I have tried to remove any laptop program that manages power and they uninstall ubuntu-desktop. What gives with Ubuntu's GNOME being dependent on laptop utilities? I'm running a desktop and have no need of laptop utilities.
I have gone to the extreme of starting Ubuntu in Recovery Mode, dropping to a root shell with networking, then removing GNOME and Xserver completely and re-installing them both. The problem STILL occurs.
I have used the following commands to accomplish this:
This problem has made Ubuntu extremely unreliable, as it can crash at any time and DOES... MANY TIMES in a day!
I have a Nvidia graphics card, and an onboard card. I wanted to use both concurrently. At first I was only getting signal from the Nvidia one, but I want both. I changed the settings in my BIOS to Onboard, but it is now only coming from my onboard one. I then installed the Nvidia drivers from Additional Drivers, and then boot hung on checking battery state. I had to remove info from xorg.conf just to boot.
View 4 Replies View RelatedI just installed ubuntu on my m11x and am completely new to ubuntu. After installing the latest driver for the 335m I am stuck at checking battery state and there is no way I can get to the gui anymore. The only access I have to are the tty's and I don't know what to do. I have already tried finding a solution for a couple of hours, but cannot find any. Please help me solve this problem, I do not want to reinstall again.
View 2 Replies View RelatedScenario: ( in C++ code)
I need a process A to be able to get the start time of process B. I have the PID of the process B.
I would have thought there would be a simple system call to make by passing in the pid of Process B, but I don't thing there is??!!
So my other thought is to create a script that will be passed the pid and either I can read the file creation of /proc/<PID>/stat or I could also parse the start time of ps on the <PID>. This script can be ran from the C++ code. My difficulty is capturing this information in the C++ code. If I run exec ( or system if not a script) I need the results in a program variable....not stdout.
My only solution is write it to a tmp file and read it back into the program variable. Seems rather arguious but a least it would work.
Background - I need to port Windows code ( GetProcessTimes(creationtime,...))
Writing a bash shell script that list all process that use over 10% CPU time?
View 1 Replies View RelatedI want to get system info like up time, no of process etc. for up time i got the got from net but it is giving me error. i.e.
error:
Following is the code i m using
Code:
Whats wrong with the code?
I am writing network module (LKM). I got process information by current->pid and current->comm. But now i want current state of task. I want to know the state of running the process. I dont find any information in struct task_struct structure. how can i get the state of current running process.
View 1 Replies View Relatedi am running ubuntu 10.10 i tried installing nvidia drivers earlier. it said something about configuring X server as root. so i restarted my laptop and now i get stuck at the screen that says "checking state of battery" i know i can press ctrl alt F2. and i tried a few commands but nothing works.
View 4 Replies View RelatedI'm trying to install NVIDIA-Linux-x86-185.18.31-pkg1.run on 9.10 Alpha 3. I've tried using envyng but it wouldn't even start for some reason. It would ask for my password and that was it. So I downloaded the driver from Nvidia's site and tried to install manually. When I open terminal and put sudo /etc/init.d/gdm stop, it hangs at "Checking battery
View 1 Replies View RelatedOn server (no GUI) how can I find the state (running, sleeping, zombie) of a given process, by giving a process name or PID?
View 3 Replies View RelatedJust installed 9.10 followed by a 10.04 upgrade (wouldn't work as a 10.04 clean install). The install and upgrade all seemed to go well.
But now when booting I get a message saying "checking battery state" and then it boots no further. This is a laptop without a battery installed, running permanently from the mains through the charger.
How can I disable this check so that the laptop will still boot without a battery fitted?
get the values for the user time and system time for a process.i have tried getrusage to get values of ru_utime and ru_stimebut these don't seem to be correct
View 3 Replies View RelatedI don't think there is a way of doing this with date or clock commands. But maybe they are writing to some file and I can take a look at the file's modification time. dmesg and /var/log/messages show nothing relevant.
View 1 Replies View RelatedI am using RHEL6 on a server with 3 interfaces.
eth0 is connecting via a Cisco switch to the outer world and eth1 and eth2 to internal networks.
eth1 and eth2 are working without problems all the time, however I have the following incident with eth0: although it is RUNNING, and after it works for some time (like some hours), it then becomes incapable of sending/receiving traffic. Here are more details, after the interface exits the RUNNING state:
[root@mgt ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr E4:1F:13:6C:87:74
inet addr:9.162.91.26 Bcast:9.162.91.255 Mask:255.255.255.0
inet6 addr: fe80::e61f:13ff:fe6c:8774/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
[Code]....
I am wondering whether there this is because there is not traffic for some time and so the interface goes to idle. Is there any parameter I can tweak in RHEL6 to force the interface to remain RUNNING even in the absence of traffic (although I would be expecting that some 802.1 packets would be periodically flowing from the switch to the interface)?
I have installed thunderbird sometime back on Ubuntu.I want to know the date and time of installation. How can i get this information. I tried "stat thunderbird", but it did not give the installation time
View 6 Replies View RelatedI get the pinkish Ubuntu screen and a message such as "checking disk 1 of 4". I assume that it is doing an fsck. However, the time it takes does not seem to relate to the time it takes if I do a manual fsck (almost instantaneous) or fsck -c (several minutes to half an hour depending on the drive). I also wonder what is counts as a "disk". I have in the system:
sda1 - / 20 GB
sda2 - /home 10 GB
sda3 - swap 4 GB
sda4 - /data 115 GB
sdb1 - /quitelarge 750 GB
sdc1 - /veryhuge 1 TB
I want to monitor an application lets say that it will be apache2 to see how many in real-time it takes network resources such as upload/download per second how can i do that in linux (cmd not gui) ? I know it's possible because i can see this in windows in my nod32 firewall monitoring.
View 3 Replies View RelatedFsck is not check any file system which are not root file system at boot time.
Normally it run: /sbin/fsck -A -R -C -a
But this command doesn't do anything.
I've tried to strace it, and looks like this:
Code: