Saturday, December 23, 2017

Formatted pdf output with MarkDown, Pandoc, and Latex.

I needed to create a document in a text format that would allow me to build a pdf that can be printed in a nice manner. I chose pandoc and markdown for the primary text file. I've managed to get it looking in the way that I want it, mostly.

The following header in my makdown file setups a twosided document with inner margin of 1.5in and the top, bottom, outer of 1.0in. The H1 and H2 sections (section/subsection) are using a different sized font and are centered on the page. I've needed to do multicolumn layout in a few places so there is a new command that does that for pandoc. The font is set for times and the default size is 12pt. The downside to this is that I've not been able to get the PDF bookmarks to have the correct page numbers yet. This prints nicely though.

I pulled all of this together from a bunch of StackOverflow/StackExchange question/answer.


---
subparagraph: yes
documentclass: article
fontfamily: times
fontsize: 12pt
geometry: twoside, outer=1.0in, inner=1.5in, top=1.0in, bottom=1.0in
header-includes:
 - \usepackage{titlesec}
 - \usepackage{multicol}
 - \usepackage{bookmark}
 - \titleformat*{\section}{\fontsize{16}{20}\filcenter\selectfont}
 - \titleformat*{\subsection}{\fontsize{13}{15}\filcenter\selectfont}
 - \newcommand{\hideFromPandoc}[1]{#1}
     \hideFromPandoc{
       \let\Begin\begin
       \let\End\end
     }
---

\pagenumbering{gobble}

Some text on an intro page

\newpage

   

\pagebreak

\pagenumbering{arabic}

# Begin header of page 1 of the new document

Multicols are done in the following manner. If doing a list use make sure the blank line is there after/before \Begin/\End. They won't format properly otherwise.


\Begin{multicols}{2}

1. Item 1
2. Item 2
3. Item 3
4. Item 4
5. Item 5

\End{multicols}

Here's the makefile that I created to build the document.
output.pdf: input.md
 pandoc -f markdown -t latex -o $@  $^

clean:
 rm -f *.pdf *~


Friday, December 22, 2017

NFS cache cleaning

Running some tests with large datasets mounted via NFS. I'm using using nfsiostat to measure performance on the client. So to see how the server is acting when there's no data in the linux buffer cache, I need to clear them between runs. This Stack Overflow question has the information needed.

Thursday, November 02, 2017

hp-setup Errors

If you ever have problems with your HP network printer and the hp-setup utility under Fedora, make sure that you have SNMP turned on. I had the following error and it was due to me having turned of SNMP. The utility would fail and scanning wouldn't work.

hp-setup error: Unable to communicate with device (code=12)

Monday, April 03, 2017

Using CAC with KVM/QEMU and remote viewer

To use a SmartCard or CAC with kvm/qemu, you'll need to install remote-viewer on the machine that will run remote-viewer to connect to the remote VM. The VM will need the Smartcard hardware installed and set to Passthrough. A CCID controller will be required as well.

The command to connect to the VM with the smartcard is

remote-viewer --spice-smartcard spice://<ip or hostname of VM host>:5900

Sunday, February 26, 2017

Nouveau Fedora Dell 6520

I have a Dell E6520 personal laptop. It's old and I've had problems with the Nouveau and Nvidia GPU. With the update to Fedora 25 and Wayland, I started having more random lockups. I had disabled hardware video acceleration in Chrome, but that wasn't fixing the issue. I finally decided to lookup disabling Wayland and video acceleration. To disable Wayland, edit /etc/gdm/custom.conf:
[daemon]
# Uncoment the line below to force the login screen to use Xorg
WaylandEnable=false
To disable nouveau acceleration, edit /etc/default/grub
GRUB_CMDLINE_LINUX="rhgb quiet nouveau.noaccel=1"
Run the grub2-mkconfig command:
sudo grub2-mkconfig --output="/boot/grub2/grub.cfg

Tuesday, January 24, 2017

Intel AMT Serial Over LAN

Quick post about what I needed to do to get Serial Over Lan (SOL) working on an HP z420 workstation. This machine has a Xeon processor. Sincce there's no integrated graphics, the KVM capaability of Intel vPro/AMT doesn't work. Modify /etc/default/grub and add the following two lines at the end fo the file.
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS4,115200n8"
GRUB_SERIAL_COMMAND="serial --speed=115200 --port=0xe060 --word=8 --parity=no --stop=1"
Create the file /etc/systemd/system/serial-getty@ttyS4.service with the following contents.
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
BindsTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

[Service]
ExecStart=-/sbin/agetty --keep-baud 115200 %I vt100-nav 
Type=idle
Restart=always
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes

[Install]
WantedBy=getty.target
Enable the ttyS4 getty in systemctl with command below.
systemctl enable serial-getty@ttyS4.service
Reboot your machine. You should be able to use SOl via the following command. There will be a prompt for the AMT password. This was set in your BIOS.
amtterm host or ip address
Check the status of the getty
systemctl status serial-getty@ttyS4.service

Sunday, January 08, 2017

Opensource Software Waivers and the U.S. Government

Opensource software waivers are a joke. It may take many months or even a year or more to get the software approved. It may only be for a specific version of the software as well. So, when you do get the software approved you may not be able to use the latest with whatever security patches that have been approved. If anything, the process and bureaucracy are making the their organizations more insecure.

Saturday, December 31, 2016

Ansible Waiting for VM shutdown

I've been using Ansible for the past 8 months for a web application. Recently I needed a way to wait for the VM to shutdown. The solution I ended up using is the following. Essentially it's a script that greps the virtual machine list until the virtual machine name does not show up.
  - name: wait for the VM to shutdown
    shell:  while [[ `virsh list | grep {{ vmimage }} ` ]]; do sleep 1; done; exit 0
    poll: 3
If I want to start a VM and wait for it to become ready, I use a wait_for to wait for ssh to respond. There's probably a better way to do this.
  - name: wait for vm ssh to start
    wait_for:  host={{ vmhostname}} port=22 state=present delay=10 connect_timeout=3

Not Dead

This is site isn't dead, just slumbering. I'm thinking about moving a bunch of links that I've posted on another social media site here just to make them easier to find.

Thursday, October 25, 2012

Mono CSC.exe and HASH_SET error

I fought this error until I found the magic incantation that would work on google. It's a known bug with the 2.6.x mono release.
C:\PROGRA~2\MONO-2~1.7\lib\mono\3.5\Microsoft.CSharp.targets: error : 
Error executing tool 'C:\PROGRA~2\MONO-2~1.7\bin\gmcs': 
ApplicationName='C:\PROGRA~2\MONO-2~1.7\bin\gmcs', CommandLine='/noconfig @C:\Temp\tm
p46ea550.tmp', CurrentDirectory='c:\working\ITAEngine\ITAEngine'
        Task "Csc" execution -- FAILED
        Done building target "CoreCompile" in project "c:\working\working.csproj".-- FAILED
The fix is to add /p:CscToolExe=gmcs.bat to the xbuild command line.
c:\working>xbuild /p:Configuration=Release /p:CscToolExe=gmcs.bat working.csproj
Another problem is the HASH_SET wasn't being detected which requires a new Reference. in the ItemGroup The error:
FileManager.cs(17,25): error CS0246: The type or namespace name `HashSet`1' could not be found. Are you missing a using directive or an assembly reference?
        Task "Csc" execution -- FAILED
        Done building target "CoreCompile" in project "c:\working\working.csproj".-- FAILED

The fix to include in the csproj is:

<Reference Include="System.Core" />

Monday, October 15, 2012

CentOS 6.3 SuperMicro SR-IOV Crash

System Config is SuperMicro Motherboard X9DR3-F, 3ware 9750SE-8i, CentOS 6.3

Getting this crash/hardlockup when intel_iommu=on is passed on the kernel. I don't get this when crash when I set intel_iommu=off and pci=nomsi.

sd 6:0:0:0: WARNING: (0x06:0x002C): Command (0x2a) timed out, resetting card.
Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 6
Pid: 0, comm: swapper Not tainted 2.6.32-279.9.1.el6.x86_64 #1
Call Trace:
   [] ? panic+0xa0/0x168
 [] ? watchdog_overflow_callback+0xcd/0xd0
 [] ? __perf_event_overflow+0x9d/0x230
 [] ? perf_event_overflow+0x14/0x20
 [] ? intel_pmu_handle_irq+0x336/0x550
 [] ? kprobe_exceptions_notify+0x16/0x430
 [] ? perf_event_nmi_handler+0x39/0xb0
 [] ? notifier_call_chain+0x55/0x80
 [] ? atomic_notifier_call_chain+0x1a/0x20
 [] ? notify_die+0x2e/0x30
 [] ? do_nmi+0x173/0x2b0
 [] ? nmi+0x20/0x30
 [] ? intel_unmap_page+0x0/0x180
 [] ? _spin_lock_irqsave+0x2f/0x40
 <>    [] ? add_unmap+0x2b/0xe0
 [] ? intel_unmap_page+0xca/0x180
 [] ? igb_poll+0x4d1/0xb00 [igb]
 [] ? native_smp_send_reschedule+0x49/0x60
 [] ? net_rx_action+0x103/0x2f0
 [] ? __do_softirq+0xc1/0x1e0
 [] ? handle_IRQ_event+0x60/0x170
 [] ? call_softirq+0x1c/0x30
 [] ? do_softirq+0x65/0xa0
 [] ? irq_exit+0x85/0x90
 [] ? do_IRQ+0x75/0xf0
 [] ? ret_from_intr+0x0/0x11
   [] ? intel_idle+0xde/0x170
 [] ? intel_idle+0xc1/0x170
 [] ? cpuidle_idle_call+0xa7/0x140
 [] ? cpu_idle+0xb6/0x110
 [] ? start_secondary+0x22a/0x26d
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 2.6.32-279.9.1.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Tue Sep 25 21:43:11 UTC 2012
Command line: ro root=UUID=09b1f254-2cc0-4654-9875-6c91b18bab17 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM intel_iommu=on console=tty0 console=ttyS1,115200n8 irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off  memmap=exactmap memmap=553K@64K memmap=135619K@49705K elfcorehdr=185324K memmap=64K$0K memmap=23K$617K memmap=128K$896K memmap=1120K#2069328K memmap=12288K$2070448K memmap=496K#2082736K memmap=612K$2083232K memmap=28K#2083844K memmap=208K$2083872K memmap=32K#2084080K memmap=164K$2084112K memmap=4684K#2084276K memmap=262144K$2097152K memmap=144K$4174960K memmap=16384K$4177920K
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  Centaur CentaurHauls
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000100 - 000000000009a400 (usable)
 BIOS-e820: 000000000009a400 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000007e4d4000 (usable)
 BIOS-e820: 000000007e4d4000 - 000000007e5ec000 (ACPI NVS)
 BIOS-e820: 000000007e5ec000 - 000000007f1ec000 (reserved)
 BIOS-e820: 000000007f1ec000 - 000000007f268000 (ACPI data)
 BIOS-e820: 000000007f268000 - 000000007f301000 (reserved)
 BIOS-e820: 000000007f301000 - 000000007f308000 (ACPI NVS)
 BIOS-e820: 000000007f308000 - 000000007f33c000 (reserved)
 BIOS-e820: 000000007f33c000 - 000000007f344000 (ACPI NVS)
 BIOS-e820: 000000007f344000 - 000000007f36d000 (reserved)
 BIOS-e820: 000000007f36d000 - 000000007f800000 (ACPI NVS)
 BIOS-e820: 0000000080000000 - 0000000090000000 (reserved)
 BIOS-e820: 00000000fed1c000 - 00000000fed40000 (reserved)
 BIOS-e820: 00000000ff000000 - 0000000100000000 (reserved)
 BIOS-e820: 0000000100000000 - 0000001080000000 (usable)
last_pfn = 0x1080000 max_arch_pfn = 0x400000000
user-defined physical RAM map:
 user: 0000000000000000 - 0000000000010000 (reserved)
 user: 0000000000010000 - 000000000009a400 (usable)
 user: 000000000009a400 - 00000000000a0000 (reserved)
 user: 00000000000e0000 - 0000000000100000 (reserved)
 user: 000000000308a400 - 000000000b4fb000 (usable)
 user: 000000007e4d4000 - 000000007e5ec000 (ACPI data)
 user: 000000007e5ec000 - 000000007f1ec000 (reserved)
 user: 000000007f1ec000 - 000000007f268000 (ACPI data)
 user: 000000007f268000 - 000000007f301000 (reserved)
 user: 000000007f301000 - 000000007f308000 (ACPI data)
 user: 000000007f308000 - 000000007f33c000 (reserved)
 user: 000000007f33c000 - 000000007f344000 (ACPI data)
 user: 000000007f344000 - 000000007f36d000 (reserved)
 user: 000000007f36d000 - 000000007f800000 (ACPI data)
 user: 0000000080000000 - 0000000090000000 (reserved)
 user: 00000000fed1c000 - 00000000fed40000 (reserved)
 user: 00000000ff000000 - 0000000100000000 (reserved)
DMI 2.7 present.
SMBIOS version 2.7 @ 0xF0480
AMI BIOS detected: BIOS may corrupt low RAM, working around it.
last_pfn = 0xb4fb max_arch_pfn = 0x400000000
x86 PAT enabled: cpu 0, old 0x7010600070106, new 0x7010600070106
x2apic enabled by BIOS, switching to x2apic ops
Using GB pages for direct mapping
init_memory_mapping: 0000000000000000-000000000b4fb000
RAMDISK: 0b10e000 - 0b4ee36e
ACPI: RSDP 00000000000f0450 00024 (v02 ALASKA)
ACPI: XSDT 000000007f1ec090 0009C (v01 ALASKA    A M I 01072009 AMI  00010013)
ACPI: FACP 000000007f1f6940 000F4 (v04 ALASKA    A M I 01072009 AMI  00010013)
ACPI: DSDT 000000007f1ec1b8 0A788 (v02 ALASKA    A M I 00000015 INTL 20051117)
ACPI: FACS 000000007f341f80 00040
ACPI: APIC 000000007f1f6a38 001B4 (v03 ALASKA    A M I 01072009 AMI
ACPI: SRAT 000000007f1f6bf0 00430 (v01 A M I  AMI SRAT 00000001 AMI. 00000000)
ACPI: SLIT 000000007f1f7020 00030 (v01 A M I  AMI SLIT 00000000 AMI. 00000000)
ACPI: HPET 000000007f1f7050 00038 (v01 ALASKA    A M I 01072009 AMI. 00000005)
ACPI: SPMI 000000007f1f7088 00040 (v05 A M I   OEMSPMI 00000000 AMI. 00000000)
ACPI: SSDT 000000007f1f70c8 70104 (v02  INTEL    CpuPm 00004000 INTL 20051117)
ACPI: SPCR 000000007f2671d0 00050 (v01  A M I   APTIO4 01072009 AMI. 00000005)
ACPI: BGRT 000000007f267220 00038 (v00 ALASKA    A M I 01072009 AMI  00010013)
ACPI: MCFG 000000007f267258 0003C (v01 ALASKA    A M I 01072009 MSFT 00000097)
ACPI: DMAR 000000007f267298 00170 (v01 A M I   OEMDMAR 00000001 INTL 00000001)
ACPI: EINJ 000000007f267408 00130 (v01    AMI AMI EINJ 00000000      00000000)
ACPI: ERST 000000007f267538 00210 (v01  AMIER AMI ERST 00000000      00000000)
ACPI: HEST 000000007f267748 000A8 (v01    AMI AMI HEST 00000000      00000000)
ACPI: BERT 000000007f2677f0 00030 (v01    AMI AMI BERT 00000000      00000000)
Setting APIC routing to cluster x2apic.
SRAT: PXM 0 -> APIC 0 -> Node 0
SRAT: PXM 0 -> APIC 1 -> Node 0
SRAT: PXM 0 -> APIC 2 -> Node 0
SRAT: PXM 0 -> APIC 3 -> Node 0
SRAT: PXM 0 -> APIC 4 -> Node 0
SRAT: PXM 0 -> APIC 5 -> Node 0
SRAT: PXM 0 -> APIC 6 -> Node 0
SRAT: PXM 0 -> APIC 7 -> Node 0
SRAT: PXM 0 -> APIC 8 -> Node 0
SRAT: PXM 0 -> APIC 9 -> Node 0
SRAT: PXM 0 -> APIC 10 -> Node 0
SRAT: PXM 0 -> APIC 11 -> Node 0
SRAT: PXM 1 -> APIC 32 -> Node 1
SRAT: PXM 1 -> APIC 33 -> Node 1
SRAT: PXM 1 -> APIC 34 -> Node 1
SRAT: PXM 1 -> APIC 35 -> Node 1
SRAT: PXM 1 -> APIC 36 -> Node 1
SRAT: PXM 1 -> APIC 37 -> Node 1
SRAT: PXM 1 -> APIC 38 -> Node 1
SRAT: PXM 1 -> APIC 39 -> Node 1
SRAT: PXM 1 -> APIC 40 -> Node 1
SRAT: PXM 1 -> APIC 41 -> Node 1
SRAT: PXM 1 -> APIC 42 -> Node 1
SRAT: PXM 1 -> APIC 43 -> Node 1
SRAT: Node 0 PXM 0 0-80000000
SRAT: Node 0 PXM 0 100000000-880000000
SRAT: Node 1 PXM 1 880000000-1080000000
Bootmem setup node 0 0000000000000000-000000000b4fb000
  NODE_DATA [0000000000011040 - 000000000004503f]
  bootmap [0000000000046000 -  000000000004769f] pages 2
(8 early reservations) ==> bootmem [0000000000 - 000b4fb000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0000006000 - 0000008000]       TRAMPOLINE ==> [0000006000 - 0000008000]
  #2 [0004000000 - 0005012024]    TEXT DATA BSS ==> [0004000000 - 0005012024]
  #3 [000b10e000 - 000b4ee36e]          RAMDISK ==> [000b10e000 - 000b4ee36e]
  #4 [000009a400 - 0000100000]    BIOS reserved ==> [000009a400 - 0000100000]
  #5 [0005013000 - 0005013368]              BRK ==> [0005013000 - 0005013368]
  #6 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
  #7 [0000011000 - 0000011030]        ACPI SLIT ==> [0000011000 - 0000011030]
found SMP MP-table at [ffff8800000fcee0] fcee0
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  DMA32    0x00001000 -> 0x00100000
  Normal   0x00100000 -> 0x00100000
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x0000009a
    0: 0x0000308b -> 0x0000b4fb
ACPI: PM-Timer IO Port: 0x408
Setting APIC routing to cluster x2apic.
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 almost reached. Keeping one slot for boot cpu.  Processor 0/0x0 ignored.
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 almost reached. Keeping one slot for boot cpu.  Processor 1/0x2 ignored.
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x04] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 almost reached. Keeping one slot for boot cpu.  Processor 2/0x4 ignored.
ACPI: LAPIC (acpi_id[0x06] lapic_id[0x06] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 almost reached. Keeping one slot for boot cpu.  Processor 3/0x6 ignored.
ACPI: LAPIC (acpi_id[0x08] lapic_id[0x08] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 almost reached. Keeping one slot for boot cpu.  Processor 4/0x8 ignored.
ACPI: LAPIC (acpi_id[0x0a] lapic_id[0x0a] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 almost reached. Keeping one slot for boot cpu.  Processor 5/0xa ignored.
ACPI: LAPIC (acpi_id[0x0c] lapic_id[0x20] enabled)
ACPI: LAPIC (acpi_id[0x0e] lapic_id[0x22] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 7/0x22 ignored.
ACPI: LAPIC (acpi_id[0x10] lapic_id[0x24] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 8/0x24 ignored.
ACPI: LAPIC (acpi_id[0x12] lapic_id[0x26] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 9/0x26 ignored.
ACPI: LAPIC (acpi_id[0x14] lapic_id[0x28] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 10/0x28 ignored.
ACPI: LAPIC (acpi_id[0x16] lapic_id[0x2a] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 11/0x2a ignored.
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 12/0x1 ignored.
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x03] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 13/0x3 ignored.
ACPI: LAPIC (acpi_id[0x05] lapic_id[0x05] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 14/0x5 ignored.
ACPI: LAPIC (acpi_id[0x07] lapic_id[0x07] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 15/0x7 ignored.
ACPI: LAPIC (acpi_id[0x09] lapic_id[0x09] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 16/0x9 ignored.
ACPI: LAPIC (acpi_id[0x0b] lapic_id[0x0b] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 17/0xb ignorePUS/possible_cpus limit of 1 reached.  Processor 18/0x21 ignored.
ACPI: LAPIC (acpi_id[0x0f] lapic_id[0x23] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 19/0x23 ignored.
ACPI: LAPIC (acpi_id[0x11] lapic_id[0x25] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 20/0x25 ignored.
ACPI: LAPIC (acpi_id[0x13] lapic_id[0x27] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 21/0x27 ignored.
ACPI: LAPIC (acpi_id[0x15] lapic_id[0x29] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 22/0x29 ignored.
ACPI: LAPIC (acpi_id[0x17] lapic_id[0x2b] enabled)
ACPI: NR_CPUS/possible_cpus limit of 1 reached.  Processor 23/0x2b ignored.
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x0a] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x0c] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x0e] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x10] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x12] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x14] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x16] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x09] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x0b] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x0d] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x0f] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x11] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x13] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x15] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x17] high edge lint[0x1])
ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
ACPI: IOAPIC (id[0x02] address[0xfec01000] gsi_base[24])
IOAPIC[1]: apic_id 2, version 32, address 0xfec01000, GSI 24-47
ACPI: IOAPIC (id[0x03] address[0xfec40000] gsi_base[48])
IOAPIC[2]: apic_id 3, version 32, address 0xfec40000, GSI 48-71
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
Using ACPI (MADT) for SMP configuration information
ACPI: HPET id: 0x8086a701 base: 0xfed00000
24 Processors exceeds NR_CPUS limit of 1
SMP: Allowing 1 CPUs, 0 hotplug CPUs
PM: Registered nosave memory: 000000000009a000 - 000000000009b000
PM: Registered nosave memory: 000000000009b000 - 00000000000a0000
PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
PM: Registered nosave memory: 0000000000100000 - 000000000308b000
Allocating PCI resources starting at b4fb000 (gap: b4fb000:72fd9000)
Booting paravirtualized kernel on bare hardware
NR_CPUS:4096 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:2
PERCPU: Embedded 31 pages/cpu @ffff880003200000 s94424 r8192 d24360 u2097152
pcpu-alloc: s94424 r8192 d24360 u2097152 alloc=1*2097152
pcpu-alloc: [0] 0 
Built 1 zonelists in Node order, mobility grouping on.  Total pages: 33408
Policy zone: DMA32
Kernel command line: ro root=UUID=09b1f254-2cc0-4654-9875-6c91b18bab17 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM intel_iommu=on console=tty0 console=ttyS1,115200n8 irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off  memmap=exactmap memmap=553K@64K memmap=135619K@49705K elfcorehdr=185324K memmap=64K$0K memmap=23K$617K memmap=128K$896K memmap=1120K#2069328K memmap=12288K$2070448K memmap=496K#2082736K memmap=612K$2083232K memmap=28K#2083844K memmap=208K$2083872K memmap=32K#2084080K memmap=164K$2084112K memmap=4684K#2084276K memmap=262144K$2097152K memmap=144K$4174960K memmap=16384K$4177920K
Intel-IOMMU: enabled
Misrouted IRQ fixup and polling support enabled
This may significantly impact system performance
Disabling memory control group subsystem
PID hash table entries: 1024 (order: 1, 8192 bytes)
xsave/xrstor: enabled xstate_bv 0x7, cntxt size 0x340
Checking aperture...
No AGP bridge found
Queued invalidation will be enabled to support x2apic and Intr-remapping.
Memory: 111036k/185324k available (5153k kernel code, 49156k absent, 25132k reserved, 7165k data, 1260k init)
Hierarchical RCU implementation.
NR_IRQS:33024 nr_irqs:256
Extended CMOS year: 2000
Spurious LAPIC timer interrupt on cpu 0
do_IRQ: 0.230 No irq handler for vector (irq -1)
do_IRQ: 0.197 No irq handler for vector (irq -1)
Console: colour VGA+ 80x25
console [tty0] enabled
console [ttyS1] enabled
Fast TSC calibration using PIT
Detected 2000.108 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 4000.21 BogoMIPS (lpj=2000108)
pid_max: default: 32768 minimum: 301
Security Framework initialized
SELinux:  Initializing.
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
Mount-cache hash table entries: 256
Initializing cgroup subsys ns
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
Initializing cgroup subsys net_prio
CPU: Physical Processor ID: 1
CPU: Processor Core ID: 0
using mwait in idle threads.
SMP alternatives: switching to UP code
Freeing SMP alternatives: 34k freed
ACPI: Core revision 20090903
ftrace: converting mcount calls to 0f 1f 44 00 00
ftrace: allocating 21019 entries in 83 pages
DMAR: Host address width 46
DMAR: DRHD base: 0x000000fbffe000 flags: 0x0
IOMMU fbffe000: ver 1:0 cap d2078c106f0462 ecap f020fe
DMAR: DRHD base: 0x000000dfffc000 flags: 0x1
IOMMU dfffc000: ver 1:0 cap d2078c106f0462 ecap f020fe
DMAR: RMRR base: 0x0000007f285000 end: 0x0000007f2a1fff
DMAR: ATSR flags: 0x0
DMAR: RHSA base: 0x000000fbffe000 proximity domain: 0x1
DMAR: RHSA base: 0x000000dfffc000 proximity domain: 0x0
IOAPIC id 3 under DRHD base 0xfbffe000
IOAPIC id 0 under DRHD base 0xdfffc000
IOAPIC id 2 under DRHD base 0xdfffc000
HPET id 0 under DRHD base 0xdfffc000
Your BIOS has requested that x2apic be disabled.
This will leave your machine vulnerable to irq-injection attacks.
Use 'intremap=no_x2apic_optout' to override BIOS request.

Thursday, September 06, 2012

"Pi and The Lost Function" launched

My employer Advanced Training & Learning Technology, LLC (AT&LT) launched "Pi and The Lost Function" August 31.  So, now the game is live.  If you're interested in a game that will help you learn Pre-Algebra or refresh your memory check it out.

There will be additional math games coming soon.


Monday, July 02, 2012

Ruby and Passing Methods/Functions

I've been writing some software to test connectivity to our server software. I started writing the code in Ruby primarily because it's easy to write. It also provides another language implementation of libraries to use against the server verifying that nothing written is specific to our particular language/setup.

One of the tests we needed was a testing a bunch of different connections to the server. To test the absolute max thru-put of the system JMeter was used. However, a test that was more of a simulation of users connecting was needed. Ruby has threads that are non-native and are only scheduled by the Ruby process. These aren't necessarily optimal, but may have been good enough.

So, what I decided to do was use Ruby's native system fork ability and spawn processes that would communicate with the server. The original code worked fine. However, I needed the ability to do process control in a more generic way that made it easy to spawn any simulation that I needed. To do this I ended up modifying the code to allow the passing of functions/methods to the process controller.

def process_control(num_process_to_spawn, param_for_func)
   ...
   func = nil
   num_process_to_spawn.times { |count|
   func = yield func
   pid = fork { 
      if func.call(param_for_func) = true
         #Exit after child func is finished. 
         Process.exit(true)
      else
         #Don't exit we're the parent
         Process.exit(false)
      end
   }
   ....
end

The above code calls forks and executes in the child the function call that is passed in via the yield. An example of how to use this is below.

<pre>
def function_count_num_times(num_times)
   num_times.times { |count| puts "Count: #{count}" } 
end

#Spawn 400 processes and pass 10 to the called function
process_control(400, 10) {  |func| 
   func = method(:function_count_num_times)
}

If you need to pass a method of an object it's pretty easy and you can setup the appropriate data for the method to work with ahead of time.

class TestControl
   attr_reader :internal_count
   def initialize()
      @internal_count = 0
   end

   def output(num_times)
      num_times.times { |count| 
         puts "count: #{count}"
      }
   end
end

#be careful of garbage collection
test_control_objects = Array.new

process_control(400, 10) { |func|
   ctrl_obj = TestControl.new
   test_control_objects.push(ctrl_obj)
   func = ctrl_obj.method(:output)
}

Sunday, February 19, 2012

Google Docs Issues

So, we're using Gmail/Google Apps at my new job. The doc feature makes collaboration a breeze. It has issues though.

1. There is no lossless way to backup documents. This shouldn't be a problem because Google shouldn't lose stuff. However, some of us were using our personal gmail accounts until the new system was available. If you only had a few docs, it's easy to share the docs between accounts and make a copy in the new account. You lose all revision history in the new doc.

If you have lots of documents, this is difficult to do. There's a download tool that will allow you download the docs in a specific collection, but only in a different format. Formatting is lost. So, it's not lossless.

2. There are only a few specific styles and you can't add any new ones. You can change the pre-defined ones, but that's of limited use. In previous versions, you had the opportunity to change styles via the html input capability, but that's gone now.

3. No ability to reference another doc and stitch multiple docs together at export to pdf time.

4. No image caption capability. This isn't a big deal. Insert a 1 cell table and put text at the bottom.

Because the range of formatting options are limited, it would be really nice if GoogleDocs provided a basic DocBook or even LaTex export capability. It would make it easier to integrate the documents into CM repository. It would also allow you to create your own formatting and combine documents as needed.

The strength of GoogleDocs is it's online collaboration capability. You don't to pass around word documents and worry about who has what revision. I don't know if Sharepoint makes this easier now. Probably not since it's just a storage location.

Monday, June 13, 2011

Switching to XFCE for F15

I've begun the process of upgrading my home machines to Fedora 15. Unfortunately, I'm going to have to switch to XFCE. The new Gnome 3 Shell is pretty horrendous on my wife's D820 laptop. The opensource nouveau drivers aren't good enough to run it. It's not only the lack of speed but how they seem to have gone out of their way to make it not easy to use. The one thing that sticks out is the lack of a shutdown button. If you want to shutdown the computer, you have to hold down the ALT key while hovering over the suspend or log out and hit shutdown. Here's a bug report for the lack of shutdown and resulting conversation.

I've not tried my work laptop yet. While it's docked it will crash when I try to suspend using the Nvidia closed driver. I'll try the nouveau driver under F15 eventually. If it fails like it did under F14, the suspend only button is totally unsatisfactory.

Prior to release, the buzz was that Gnome 3 was going to avoid the problems that accompanied the transition to KDE 4. It looks like the transition to Gnome 3 will be just as bad. I imagine that XFCE's user base will grow immensely now.

Fedora 15 is the most disappointed that I've been in a while with Fedora.

Friday, December 31, 2010

Updating machines to F14

I've updated most of the machines in the house to F14. I purchased a 500GB 2.5" hard drive and used that for a new F14 64bit install for my desktop machine. The virtualization stuff seems to be working better. When I get the new work laptop, I'll use F14 on it.

Friday, October 15, 2010

Jira/Confluence vs Trac

I've used Trac in the past for projects. For my current project we have Jira and Confluence. Jira and Confluence are nice. However, trying to manage tasking for sprints is a pain. With Trac it was easy to create tickets representing tasking. Those tickets could be assigned to a milestone. There doesn't seem to be an analog Jira.

Confluence is a wiki, but integration with Jira is limited. Trac tickets can be referenced within it's internal wiki. When a ticket is closed it's displayed with a line through it. There are Jira macros for Confluence but it's not a nice as what trac offers. There's even an eclipse plugin for Trac to make it easier to deal with tasking.

We're going to examine the Greenhopper add on for Jira. Maybe it will make things better.

Friday, October 01, 2010

Put Your Name on a Patent?

Considering all of the bad press that software patents have been getting, would you take pride in having your name on a software patent? They're pretty much a joke. The only reason you'd want one is so you can sue your competitors when they start competing. Look at MS and Apple. Google is starting to eat their lunch in the smart phone market. Their only option is to sue.

Friday, September 24, 2010

Marilla Walking

Marilla is finally taking her first steps. She's taken a few small half steps over the past couple of weeks. Today she actually started walking to people. Our babysitter's daughters had her walking between them today. Tonight she's walked to me and Lee Ann.

Sunday, September 05, 2010

Training Your Leaders

I found this article on training managers at tech companies on slashdot. It's interesting in that new companies don't really have a culture of management. The founders may still be running the company. Since they're techies, they are probably young.

This may be a little different from other people starting small business, but I don't know. If you're starting a small business (non-tech related), it seems to me that you may or may not have all of that knowledge either. You'll probably hire an accountant to keep the books and make sure that you get your taxes paid on time. An attorney will probably need to be engaged, especially if the company will be incorporated. There are lots of books and local programs that will help the new small business owner learn things that they probably don't already know. So it seems like this may be a common issue.

The issue with tech companies especially the very large one is that they seem to grow very quickly. Other small business may not have this problem. Tech companies seem to grow into huge behemoths almost over night. If a business has this problem, it's probably prudent to hire someone that can help manage the company while not interfering with founder's vision.

The same author had another article aboutold techies. It paints a pretty discouraging picture for those of us that are aging and doing tech. It's almost an either or proposition. You can do tech related things, not focus on growing tech skills while picking management capability. Or, you must focus solely on tech skills picking up enough to do tech lead/team mgmt perhaps even enough for product management. The skills that you need as a someone that wants to maintain technical path are project level budgeting, hiring, and a focus on improving your capabilities.

You might ask why someone would want to remain on a technical path. My answer is better job security. Highly skilled technical people with update to skills and excellent background may have an easier time finding jobs than middle managers. Middle managers seem to be a dime a dozen. It seems to be the first to go at companies especially large ones.

Another issue is that at places like government contractors, getting into management position is harder due to competition with those that may have MBA and have started at the organization on a management track. This is especially true for those contractors that are Department of Defense (DoD) related.

The problem with DoD companies is that they'll be hiring most of their management from the either recently released/retired officers. Those individuals have plenty of experience managing people. (Probably not so much with EEO types of things though.) Middle mgmt will more than likely be ex military. This is especially true if they're expected to do business development/bring in contracts. They'll know the lingo and have contacts that are needed to form those connections.

Moving above middle mgmt in the above type of organization probably means that you'll need to have been a flag officer. Admirals and Generals are flag officers. It will be tough moving up. Perhaps those Generals/Admirals are worth it. I'm skeptical.

Former members of congress or high ranking government officials also take up those positions. Don't forget that Dick Cheney used to be Chairman and CEO at Halliburton. He certainly brought home the bacon once he became VP. (Yeah it's a snarky low blow.)

All in all, learning the soft skills of management/leadership is important. Even highly skilled individuals maintaining a technical path will need to lead teams of people. (Linus Torvalds is an example.) Just like your tech skills, you can't count on the company providing the training. You'll have to do your own reading or take classes for those things that can be taught. Leading and dealing with people will need to be learned on the job. Try to find a mentor that can help.