LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2010, 01:44 AM   #1
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Rep: Reputation: 30
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.
 
Old 04-27-2010, 01:49 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 04-27-2010, 02:26 AM   #3
linuxunix
Member
 
Registered: Mar 2010
Location: California
Distribution: Slackware
Posts: 235

Rep: Reputation: 18
Run the command through sudo user configured.
It will run without any issue.
 
Old 04-27-2010, 02:29 AM   #4
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by druuna View Post
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 .
 
Old 04-27-2010, 02:34 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 04-27-2010, 03:11 AM   #6
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
thx replies,

this is not virtual machine .
 
Old 04-27-2010, 03:27 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Can you try:
Code:
hwclock --directisa
and post the output here?

Kind regards,

Eric
 
Old 04-27-2010, 05:41 AM   #8
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by EricTRA View Post
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 ...
 
Old 04-27-2010, 05:48 AM   #9
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 04-27-2010, 07:49 AM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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.
 
Old 04-27-2010, 07:52 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hardware clock time differs from system time after setting maxgsp Linux - Software 2 02-28-2009 07:15 AM
System time vs Hardware time and Daylight Savings Time Toadman Linux - General 6 03-17-2007 08:12 AM
System time vs Hardware time and Daylight Savings Time Toadman Linux - Networking 6 03-16-2007 07:14 PM
Where does RH8 daily set system time to hardware clock time smartnorman Red Hat 1 05-24-2006 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration