Re: [gentoo-user] system time 6-hr. ahead

2013-05-11 Thread Manuel McLure
For PHP you need to set the date.timezone variable in the php.ini file -
that should fix things. For asterisk I have no clue.


On Fri, May 10, 2013 at 10:31 PM, Joseph syscon...@gmail.com wrote:

 On 05/10/13 23:25, Joseph wrote:

 My computer time reported by asterisk server or php database is 6hr ahead.
 Why?

 My desktop clock is correct, and command line date reporting local time
 as well.
 My /etc/conf.d/hwclock
 clock=local
 clock_hctosys=YES
 clock_systohc=YES

 Should I set clock=UTC?
 I'm running Windows via VirtualBox and I know windows is using local
 time.


 I forgot to mention:
 /etc/timezone
 Canada/Mountain
 --
 Joseph




-- 
Manuel A. McLure WW1FA man...@mclure.org http://www.mclure.org
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.   -- H.P. Lovecraft


Re: [gentoo-user] system time 6-hr. ahead

2013-05-11 Thread Joseph

On 05/10/13 23:00, Manuel McLure wrote:

  For PHP you need to set the date.timezone variable in the php.ini file
  - that should fix things. For asterisk I have no clue.



When I set in: /etc/conf.d/hwclock
clock=UTC 
my server php and asterisk reporting correct clock setting by on my desktop is reporting 6hr behind.

so is date 6hr behind.

I've tried to set localtime in .bashrc
TZ=Canada/Mountain

log OUT / log IN but it didn't make any difference. The desktop XFCE clock is 
6hr behind.

--
Joseph



[gentoo-user] Re: system time 6-hr. ahead

2013-05-11 Thread Nikos Chantziaras

On 11/05/13 08:25, Joseph wrote:

My computer time reported by asterisk server or php database is 6hr ahead.
Why?

My desktop clock is correct, and command line date reporting local
time as well.
My /etc/conf.d/hwclock
clock=local
clock_hctosys=YES
clock_systohc=YES

Should I set clock=UTC? I'm running Windows via VirtualBox and I know
windows is using local time.


Try setting Windows to use UTC time instead:

http://crashmag.net/configuring-windows-7-support-for-utc-bios-time

It's what I use here for years and never had a problem with it.




Re: [gentoo-user] Dolphin's nfs:// kioslave transfers files slowly

2013-05-11 Thread Florian Philipp
Am 09.05.2013 17:01, schrieb Alan McKinnon:
 Hi,
 
 Dolphin has a kioslave for nfs, used as nfs:// and mine runs slowly :-)
 
 A transfer from my laptop to my media server using a regular nfs mount
 runs at max speed (100Mb) over the LAN.
 Using nfs:// it's 15% of that at most, usually around 10Mb or so.
 I see the same thing at the office when comparing smb:// and a regular
 smbfs mount using cifs.
 
 I'm clueless about where to even start looking :-)
 What could explain this behaviour?
 
 [nfs:// and smb:// seem to use libs that implement those protocols, much
 like how XBMC uses libnfs, KDE just doesn't use the libnfs project to do it]
 

Try watching it in Wireshark and compare a normal NFS mount vs. Dolphin.

Regards,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] system time 6-hr. ahead

2013-05-11 Thread Wang Xuerui
2013/5/11 Joseph syscon...@gmail.com:
 My computer time reported by asterisk server or php database is 6hr ahead.
 Why?

 My desktop clock is correct, and command line date reporting local time as
 well.
 My /etc/conf.d/hwclock
 clock=local
 clock_hctosys=YES
 clock_systohc=YES

 Should I set clock=UTC? I'm running Windows via VirtualBox and I know
 windows is using local time.


You can make Windows use UTC by editing registry:
http://superuser.com/questions/185773/does-windows-7-support-utc-as-bios-time

However, do note that Windows would NOT update the hardware clock if
this is done. So make sure Linux would properly set the HW clock at
shutdown or your clock may drift over time.



Re: Switching from grub to grub2 - WAS Re: [gentoo-user] fdisk warnings during install; questions

2013-05-11 Thread Stroller

On 10 May 2013, at 20:42, Neil Bothwick wrote:
 On Fri, 10 May 2013 09:33:10 -0400, Tanstaafl wrote:
 
 So, how was  the switch? Uneventful? The more I read, and once I
 learned you could still use a monolithic config file, the less this
 looks like a big deal...
 
 STILL use a monolithic config file? GRUB2 has to use a monolithic config
 file, usually /boot/grub2/grub.cfg. grub-mkconfig is not a bootloader,
 just an easy way of managing that monolithic configuration file.

You seem to have take it as a criticism, but I read previous message as 
approving of monolithic config files.

grub2 looks ok, because it still uses a monolithic config file

Stroller.




[gentoo-user] microphone

2013-05-11 Thread the guard
 Hi.
My sound playback works fine. when I try to record sound via sox rec I get 
nothing. in the file, but i can hear myself in the headphones while recording.
cat /proc/asound/card0/pcm0c/info 
card: 0
device: 0
subdevice: 0
stream: CAPTURE
id: ALC272X Analog
name: ALC272X Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

cat /proc/asound/card0/pcm0p/info  
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: ALC272X Analog
name: ALC272X Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

Could you help me out with that?


Re: [gentoo-user] Re: system time 6-hr. ahead

2013-05-11 Thread Joseph

On 05/11/13 09:56, Nikos Chantziaras wrote:

On 11/05/13 08:25, Joseph wrote:

My computer time reported by asterisk server or php database is 6hr ahead.
Why?

My desktop clock is correct, and command line date reporting local
time as well.
My /etc/conf.d/hwclock
clock=local
clock_hctosys=YES
clock_systohc=YES

Should I set clock=UTC? I'm running Windows via VirtualBox and I know
windows is using local time.


Try setting Windows to use UTC time instead:

http://crashmag.net/configuring-windows-7-support-for-utc-bios-time

It's what I use here for years and never had a problem with it.


I set: clock=UTC
Everything would work OK if I was able to set via user home directory 
.bash_profile
TZ=Canada/Mountain

but this is not helping, my desktop time is still behind 6hr. (server programs 
are showing correct time though).
Do I need to run an additional command after updating user  .bash_profile?
I just log OUT/IN but it is not reflecting my time zone.

--
Joseph



SOLVED - WAS Re: [gentoo-user] Using date/time variables in cronjobs?

2013-05-11 Thread Tanstaafl

Just closing out this thread...

Thanks to your and Neill and others' help, I've settled on this for my 
nightly job, that also deletes the oldest hourly's and daily over a 
certain number to keep:


#!/bin/bash
BACKUP_DIR=/my/backups/app/sql/nightly
BACKUP_DIR_hourly=/my/backups/app/sql/hourly
PGUSER=SuperUser
PG_my_app=`date '+%Y-%m-%d_%H:%M-app'`
/usr/bin/pg_dumpall -U $PGUSER -o -f $BACKUP_DIR/$PG_my_app-sql.gz
rm -f $(ls -1t $BACKUP_DIR/* | tail -n +91)
rm -f $(ls -1t $BACKUP_DIR_hourly/* | tail -n +36)

I'd like to learn how to do proper error detection using if/fi 
branching, but that will be a lesson for another day. I'll be monitoring 
these on a daily basis, so will hopefully catch any real problems before 
they cause any real problems.


Thanks again to all who helped me get these functional.


On 2013-05-05 11:25 PM, Pandu Poluan pa...@poluan.info wrote:

In bash, underscores can be part of a variable name.

$PGdd_$PGtt involves two variables: $PGdd_ (note the trailing
underscore) and $PGtt

You should write it like this:

${PGdd}_$PGtt

The { } syntax is bash's way to indicate what exactly constitutes a
variable name. IOW, the above construct has three parts: the variable
$PGdd, an underscore, and the variable $PGtt

Whenever you want to 'run' a variable name (i.e., combine it with other
characters without specifying a whitespace), you should always use
braces { } around the variable name.

That said, since you're no longer creating a directory structure, why
don't you just output everything using a single 'date' command? E.g. :

date +'mypg-%Y-%m-%d_%H:%M'






Re: Switching from grub to grub2 - WAS Re: [gentoo-user] fdisk warnings during install; questions

2013-05-11 Thread Neil Bothwick
On Sat, 11 May 2013 12:39:41 +0100, Stroller wrote:

  So, how was  the switch? Uneventful? The more I read, and once I
  learned you could still use a monolithic config file, the less this
  looks like a big deal...  
  
  STILL use a monolithic config file? GRUB2 has to use a monolithic
  config file, usually /boot/grub2/grub.cfg. grub-mkconfig is not a
  bootloader, just an easy way of managing that monolithic
  configuration file.  
 
 You seem to have take it as a criticism, but I read previous message as
 approving of monolithic config files.
 
 grub2 looks ok, because it still uses a monolithic config file

I read it different because of the use of the word could. It is not an
option with GRUB2, it is a requirement. The format and name of the file
have changed, but it is still a single file. The only optional aspect is
how you create that file. With the old GRUB you have to write it by hand,
now you have a second option.

There seems a perception that you have to use the files in /etc/grub.d
and /etc/default, but this a absolutely not the case, and never has been. 


-- 
Neil Bothwick

If you got the words it does not mean you got the knowledge.


signature.asc
Description: PGP signature


[gentoo-user] Libreoffice Compile

2013-05-11 Thread Silvio Siefke
Hello,

is there a way that i can compile Libreoffice on my Desktop System and 
copy to the Netbook? Because the netbook need long time to compile libreoffice,
and the Desktop is little faster. Or can i build a libreoffice Package on 
Desktop and copy to the netbook?

The Netbook is a Samsung NC 10, Atom Processor and the Desktop is a Fujitsu P4.



Thank you  Greetings
Silvio



Re: [gentoo-user] Libreoffice Compile

2013-05-11 Thread William Tomlinson
Why not use libreoffice-bin? Or if you really want to compile from source,
look at distcc, as long as the processor is in the same family it should be
a straightforward configuration.
On May 11, 2013 1:54 PM, Silvio Siefke siefke_lis...@web.de wrote:

 Hello,

 is there a way that i can compile Libreoffice on my Desktop System and
 copy to the Netbook? Because the netbook need long time to compile
 libreoffice,
 and the Desktop is little faster. Or can i build a libreoffice Package on
 Desktop and copy to the netbook?

 The Netbook is a Samsung NC 10, Atom Processor and the Desktop is a
 Fujitsu P4.



 Thank you  Greetings
 Silvio




Re: [gentoo-user] Libreoffice Compile

2013-05-11 Thread Canek Peláez Valdés
On Sat, May 11, 2013 at 12:53 PM, Silvio Siefke siefke_lis...@web.de wrote:

 Hello,

 is there a way that i can compile Libreoffice on my Desktop System and
 copy to the Netbook? Because the netbook need long time to compile 
 libreoffice,
 and the Desktop is little faster. Or can i build a libreoffice Package on
 Desktop and copy to the netbook?

 The Netbook is a Samsung NC 10, Atom Processor and the Desktop is a Fujitsu 
 P4.

emerge --buildpkg libreoffice
scp /usr/portage/packages/app-office/libreoffice*
netbook:/usr/portage/packages/app-office
ssh netbook
emerge -k libreoffice

Just make sure the CHOST and CFLAGS on both machines are the same.

Regards.

--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] Libreoffice Compile

2013-05-11 Thread Canek Peláez Valdés
On Sat, May 11, 2013 at 1:03 PM, Canek Peláez Valdés can...@gmail.com wrote:
 On Sat, May 11, 2013 at 12:53 PM, Silvio Siefke siefke_lis...@web.de wrote:

 Hello,

 is there a way that i can compile Libreoffice on my Desktop System and
 copy to the Netbook? Because the netbook need long time to compile 
 libreoffice,
 and the Desktop is little faster. Or can i build a libreoffice Package on
 Desktop and copy to the netbook?

 The Netbook is a Samsung NC 10, Atom Processor and the Desktop is a Fujitsu 
 P4.

 emerge --buildpkg libreoffice
 scp /usr/portage/packages/app-office/libreoffice*
 netbook:/usr/portage/packages/app-office
 ssh netbook
 emerge -k libreoffice

 Just make sure the CHOST and CFLAGS on both machines are the same.

Oh, and also the USE flags.

If you have enough diskspace, you can  have a chroot'd copy of the
netbook in your desktop, and emerge everything with --buildpkg and
copy the binaries to your netbook. I did that with a very old K6 that
I used as firewall, DHCP server, torrent server, NTP server, etc.,
before wireless modems were powerful enough, like twelve years ago.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



[gentoo-user] Traffic Intensive IPSec Tunnel

2013-05-11 Thread Nick Khamis
Hello Everyone,

Our service provider requires all connections between us be done
through IPSec IKE. From the little bit of research, I found that this
is achieved using a system with IPSec kernel modules enabled, along
with cryptography modules. On the application level, I saw ipsec tool,
OpenSWAN, and OpenVPN.

What I was wondering is which should be used for traffic intensive
connections in a deployment environment. Without starting any OpenVPN
vs OpenSwan debate, we would really like to keep the application level
to a minimum. Meaning if we could achieve the tunnel using the
required kernel modules, ipsec-tools and iptables, we see that as
keeping it simple and effective.

Your insight, suggested how-to pages are greatly appreciated.

Thanks in Advance,

Nick.



[gentoo-user] Re: system time 6-hr. ahead

2013-05-11 Thread Nikos Chantziaras

On 11/05/13 17:23, Joseph wrote:

On 05/11/13 09:56, Nikos Chantziaras wrote:

On 11/05/13 08:25, Joseph wrote:

My computer time reported by asterisk server or php database is 6hr
ahead.
Why?

My desktop clock is correct, and command line date reporting local
time as well.
My /etc/conf.d/hwclock
clock=local
clock_hctosys=YES
clock_systohc=YES

Should I set clock=UTC? I'm running Windows via VirtualBox and I know
windows is using local time.


Try setting Windows to use UTC time instead:

http://crashmag.net/configuring-windows-7-support-for-utc-bios-time

It's what I use here for years and never had a problem with it.


I set: clock=UTC
Everything would work OK if I was able to set via user home directory
.bash_profile
TZ=Canada/Mountain

but this is not helping, my desktop time is still behind 6hr. (server
programs are showing correct time though).
Do I need to run an additional command after updating user
.bash_profile?
I just log OUT/IN but it is not reflecting my time zone.


The link I posted was about setting Windows to UTC time, not Linux.




Re: [gentoo-user] Libreoffice Compile

2013-05-11 Thread Silvio Siefke
Hello,

On Sat, 11 May 2013 13:57:30 -0400 William Tomlinson
watomlin...@gmail.com wrote:

 Why not use libreoffice-bin? Or if you really want to compile from
 source, look at distcc, as long as the processor is in the same
 family it should be a straightforward configuration.
 On May 11, 2013 1:54 PM, Silvio Siefke siefke_lis...@web.de wrote:

its older version, and the Princip of Rolling Releases is normal new 
Version of Software. Okay that's not really my argument, but libreoffice-bin
has older regirements and that msg make sometimes crazy in emerge -uDN @world,
special when you have upgrade problems. Or give other package with libreoffice 
4?


Thank you for help  Greetings
Silvio



[gentoo-user] Re: Libreoffice Compile

2013-05-11 Thread Nikos Chantziaras

On 11/05/13 20:53, Silvio Siefke wrote:

Hello,

is there a way that i can compile Libreoffice on my Desktop System and
copy to the Netbook? Because the netbook need long time to compile libreoffice,
and the Desktop is little faster. Or can i build a libreoffice Package on
Desktop and copy to the netbook?

The Netbook is a Samsung NC 10, Atom Processor and the Desktop is a Fujitsu P4.


You can create a binary package on your desktop if you already have LO 
installed with:


  quickpkg --include-config=y app-office/libreoffice

The package will be created in the packages directory inside the 
portage directory. You can copy that directory to the laptop and emerge 
the binary package of LO there with:


  emerge -K app-office/libreoffice

The USE flags of the package have to match with those in your desktop. 
For a more general way to share packages between machines, read:


  http://wiki.gentoo.org/wiki/Binary_package_guide




[gentoo-user] Booting memtest86 from grub2

2013-05-11 Thread walt
Dale, you didn't describe the symptoms you're seeing, but maybe
just seeing how I did it will help:

menuentry memtest86 {
 search -l gentoo64unstable -s root
 linux ($root)/boot/memtest86/memtest
 boot 
}

Note that gentoo64unstable is the label I gave my root partition.
I do that in case I hot-plug a disk that changes the /dev/name of
the partition.  That's the reason I switched to grub2 originally.
(You can search instead for the UUID if you prefer to use that.)




[gentoo-user] Real qucik question - Copying over kernel configuration for same machines

2013-05-11 Thread Nick Khamis
Hello Everyone,

Just running an installation on another IBM machine, and wanted to know
which kernel config files can we copy over from one machine to another,
and have the same exact modules etc copied over.
Saw examples for genkern, but we build our own kernels. After copying the
files over we like to run make and make modules_install on the new machine.


Thanks in Advance,

Nick.



Re: [gentoo-user] Settings for Xeon E3-1200 v2/3rd Gen video card

2013-05-11 Thread Walter Dnes
On Fri, May 10, 2013 at 02:16:34PM -0400, Michael Mol wrote
 On 05/10/2013 02:04 PM, Walter Dnes wrote:
  
What settings do I use for VIDEO_CARDS= in make.conf? Is intel good
  enough?
 
 That's what I have.

  I just remembered an excellent adventure I had several months ago
when setting up my HTPC (desktop Intel with onboard GPU).  Do you get
any hits when you run...

grep 965 /var/log/Xorg.0.log

  Let me know if you do, because it would affect what I need to do.
If you see complaints about not being able to find a driver, for a trial
run, which doesn't make any permanent changes, try (one long line)...

USE=-video_cards_i915 video_cards_i965 classic emerge -pv --deep 
--changed-use @world

  The permanent equivalant would be changing to...

VIDEO_CARDS=intel i965

...in your make.conf, adding the classic USE flag if you don't already
have it, and running...

emerge --deep --changed-use @world

  As near as I can tell...
* the kernel uses an i915 driver
* userspace programs (e.g. mesa) default to a userspace i915 driver.
* but they can use the additional capacity of the newer Intel chips,
  hence the i965 userspace driver
* result is faster acceleration

  You may need both classic and gallium USE flags.  If you do make
this change, can you do a video speedtest/benchmark before and after?

-- 
Walter Dnes waltd...@waltdnes.org
I don't run desktop environments; I run useful applications



Re: [gentoo-user] Traffic Intensive IPSec Tunnel

2013-05-11 Thread Michael Mol
On 05/11/2013 03:13 PM, Nick Khamis wrote:
 Hello Everyone,
 
 Our service provider requires all connections between us be done
 through IPSec IKE. From the little bit of research, I found that this
 is achieved using a system with IPSec kernel modules enabled, along
 with cryptography modules. On the application level, I saw ipsec tool,
 OpenSWAN, and OpenVPN.
 
 What I was wondering is which should be used for traffic intensive
 connections in a deployment environment. Without starting any OpenVPN
 vs OpenSwan debate, we would really like to keep the application level
 to a minimum. Meaning if we could achieve the tunnel using the
 required kernel modules, ipsec-tools and iptables, we see that as
 keeping it simple and effective.
 
 Your insight, suggested how-to pages are greatly appreciated.

To my knowledge, OpenVPN does not use IPSec. Instead, it encapsulates
either IP/IPv6 (tun mode) or layer 2 (tap mode) over TLS. If your
service provider requires IPSec and IKE, best forget about OpenVPN.

http://www.ipsec-howto.org/x304.html

Look under Automatic keyed connections using racoon




signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Traffic Intensive IPSec Tunnel

2013-05-11 Thread Nick Khamis
Thanks yet again Michael! Enjoy your weekend.

N.

On 5/11/13, Michael Mol mike...@gmail.com wrote:
 On 05/11/2013 03:13 PM, Nick Khamis wrote:
 Hello Everyone,

 Our service provider requires all connections between us be done
 through IPSec IKE. From the little bit of research, I found that this
 is achieved using a system with IPSec kernel modules enabled, along
 with cryptography modules. On the application level, I saw ipsec tool,
 OpenSWAN, and OpenVPN.

 What I was wondering is which should be used for traffic intensive
 connections in a deployment environment. Without starting any OpenVPN
 vs OpenSwan debate, we would really like to keep the application level
 to a minimum. Meaning if we could achieve the tunnel using the
 required kernel modules, ipsec-tools and iptables, we see that as
 keeping it simple and effective.

 Your insight, suggested how-to pages are greatly appreciated.

 To my knowledge, OpenVPN does not use IPSec. Instead, it encapsulates
 either IP/IPv6 (tun mode) or layer 2 (tap mode) over TLS. If your
 service provider requires IPSec and IKE, best forget about OpenVPN.

 http://www.ipsec-howto.org/x304.html

 Look under Automatic keyed connections using racoon






Re: [gentoo-user] Real qucik question - Copying over kernel configuration for same machines

2013-05-11 Thread staticsafe
On 5/11/2013 20:39, Nick Khamis wrote:
 Hello Everyone,
 
 Just running an installation on another IBM machine, and wanted to know
 which kernel config files can we copy over from one machine to another,
 and have the same exact modules etc copied over.
 Saw examples for genkern, but we build our own kernels. After copying the
 files over we like to run make and make modules_install on the new machine.
 
 
 Thanks in Advance,
 
 Nick.
 

The .config in the kernel source directory.

-- 
staticsafe
O ascii ribbon campaign - stop html mail - www.asciiribbon.org
Please don't top post - http://goo.gl/YrmAb
Don't CC me! I'm subscribed to whatever list I just posted on.



Re: [gentoo-user] system time 6-hr. ahead

2013-05-11 Thread Joseph

On 05/10/13 23:00, Manuel McLure wrote:

  For PHP you need to set the date.timezone variable in the php.ini file
  - that should fix things. For asterisk I have no clue.


Yes, you are correct.
In php time zone setting:

/etc/php/apache2-php5.4/php.ini
...
date.timezone = Canada/Mountain

In asteriks:
cdr.conf
...
[csv]
;usegmtime=yes; log date/time in GMT.  Default is no

--
Joseph



  On Fri, May 10, 2013 at 10:31 PM, Joseph [1]syscon...@gmail.com
  wrote:

On 05/10/13 23:25, Joseph wrote:

My computer time reported by asterisk server or php database is 6hr
ahead.
Why?
My desktop clock is correct, and command line date reporting local
time as well.
My /etc/conf.d/hwclock
clock=local
clock_hctosys=YES
clock_systohc=YES
Should I set clock=UTC?
I'm running Windows via VirtualBox and I know windows is using
local time.

I forgot to mention:
/etc/timezone
Canada/Mountain
--
Joseph