LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   system time (https://www.linuxquestions.org/questions/linux-newbie-8/system-time-804440/)

elainelaw 04-27-2010 01:44 AM

system time
 
I have a debian server , want to know what is the hardware clock time
of it , I tried use hwclock , but not work , can advise what can i do ? thx

#hwclock
hwclock is unable to get I/O port access: the iopl(3) call failed.
Probably you need root privileges.

druuna 04-27-2010 01:49 AM

Hi,

First thing I norice: Probably you need root privileges.

You don't mention this, but did you try this as a normal user or as root user. It should be done as root.

Hope this helps.

linuxunix 04-27-2010 02:26 AM

Run the command through sudo user configured.
It will run without any issue.

elainelaw 04-27-2010 02:29 AM

Quote:

Originally Posted by druuna (Post 3948903)
Hi,

First thing I norice: Probably you need root privileges.

You don't mention this, but did you try this as a normal user or as root user. It should be done as root.

Hope this helps.


I use root user to do it already .

EricTRA 04-27-2010 02:34 AM

Hello elainelaw,

Is this on your own physical server or on a VPS? This kind of error happens mostly in virtual environment where hardware is 'shared'.

Kind regards,

Eric

elainelaw 04-27-2010 03:11 AM

thx replies,

this is not virtual machine .

EricTRA 04-27-2010 03:27 AM

Hi,

Can you try:
Code:

hwclock --directisa
and post the output here?

Kind regards,

Eric

elainelaw 04-27-2010 05:41 AM

Quote:

Originally Posted by EricTRA (Post 3949000)
Hi,

Can you try:
Code:

hwclock --directisa
and post the output here?

Kind regards,

Eric

thx , it works to show the time now , i tried to man hwclock , but do not find what is directisa ...

EricTRA 04-27-2010 05:48 AM

Hello,

This is what I found on the net:
Quote:

This option tells hwclock to use explicit I/O instructions to access the Hardware Clock. Without this option, hwclock will try to use the /dev/rtc device (which it assumes to be driven by the rtc device driver).
Can you tell us what kernel you're using?
Code:

uname -r
Kind regards,

Eric

onebuck 04-27-2010 07:49 AM

Hi,

Look at the online 'man hwclock';


Quote:

excerpt online 'man hwclock';

--directisa
is meaningful only on an ISA machine or an Alpha (which implements enough of ISA to be, roughly speaking, an ISA machine for hwclock's purposes). For other machines, it has no effect. This option tells hwclock to use explicit I/O instructions to access the Hardware Clock. Without this option, hwclock will try to use the /dev/rtc device (which it assumes to be driven by the rtc device driver). If it is unable to open the device (for read), it will use the explicit I/O instructions anyway.

The rtc device driver was new in Linux Release 2.

onebuck 04-27-2010 07:52 AM

Hi,

@elainelaw: You seem to be struggling with GNU/Linux. I've noticed a lot of recent posts. I suggest that you look at these useful links;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Bash Reference Manual
Advanced Bash-Scripting Guide
Linux Newbie Admin Guide
LinuxSelfHelp
Getting Started with Linux

The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!


All times are GMT -5. The time now is 09:36 AM.