Puppeteer not working NodeJS 17 on Arch Linux - node.js

I've started working with Puppeteer and for some reason I cannot get it to work on my box. This error seems to be a common problem (SO1, SO2) but all of the solutions do not solve this error for me. I have tested it with a clean node package (see reproduction) and I have taken the example from the official Puppeteer 'Getting started' webpage.
How can I resolve this error?
Versions and hardware
/tmp/so_example » uname -a
Linux tom.arch 5.15.2-arch1-1 #1 SMP PREEMPT Fri, 12 Nov 2021 19:22:10 +0000 x86_64 GNU/Linux
/tmp/so_example » node --version
v17.1.0
/tmp/so_example » npm list
so_example#1.0.0 /tmp/so_example
└── puppeteer#11.0.0
/tmp/so_example » cat /proc/meminfo
MemTotal: 32492764 kB
MemFree: 600032 kB
MemAvailable: 24446556 kB
Buffers: 7149964 kB
Cached: 9549048 kB
SwapCached: 0 kB
Active: 9843552 kB
Inactive: 10980476 kB
Active(anon): 462692 kB
Inactive(anon): 5481100 kB
Active(file): 9380860 kB
Inactive(file): 5499376 kB
Unevictable: 723108 kB
Mlocked: 17336 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 4848276 kB
Mapped: 625156 kB
Shmem: 1816292 kB
KReclaimable: 9438608 kB
Slab: 10007568 kB
SReclaimable: 9438608 kB
SUnreclaim: 568960 kB
KernelStack: 26240 kB
PageTables: 63012 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 16246380 kB
Committed_AS: 16256172 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 103964 kB
VmallocChunk: 0 kB
Percpu: 14592 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
FileHugePages: 0 kB
FilePmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 5072608 kB
DirectMap2M: 20758528 kB
DirectMap1G: 7340032 kB
/tmp/so_example » lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) i7-10875H CPU # 2.30GHz
CPU family: 6
Model: 165
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
Stepping: 2
CPU max MHz: 5100.0000
CPU min MHz: 800.0000
BogoMIPS: 4601.60
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnow
prefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust sgx bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt inte
l_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp pku ospke sgx_lc md_clear flush_l1d arch_capabilities
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 256 KiB (8 instances)
L1i: 256 KiB (8 instances)
L2: 2 MiB (8 instances)
L3: 16 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-15
Vulnerabilities:
Itlb multihit: KVM: Mitigation: VMX disabled
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
Srbds: Not affected
Tsx async abort: Not affected
Reproduction
/tmp/so_example » npm init -y
Wrote to /tmp/so_example/package.json:
{
"name": "so_example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
/tmp/so_example » npm i puppeteer
added 57 packages, and audited 58 packages in 11s
8 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
/tmp/so_example » npm list
so_example#1.0.0 /tmp/so_example
└── puppeteer#11.0.0
/tmp/so_example » echo "const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://google.com');
await browser.close();
})();" > example.js
/tmp/so_example » nvm use 17
Now using node v17.1.0 (npm v8.1.2)
/tmp/so_example » node example.js
/tmp/so_example/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:226
error: new Errors_js_1.ProtocolError(),
^
ProtocolError: Protocol error (Page.navigate): Target closed.
at /tmp/so_example/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:226:24
at new Promise (<anonymous>)
at CDPSession.send (/tmp/so_example/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:222:16)
at navigate (/tmp/so_example/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:148:47)
at FrameManager.navigateFrame (/tmp/so_example/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:131:13)
at Frame.goto (/tmp/so_example/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:500:41)
at Page.goto (/tmp/so_example/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1167:53)
at /tmp/so_example/example.js:6:14
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
originalMessage: undefined
}
Node.js v17.1.0
I get the same error with the following versions:
/tmp/so_example » nvm use 16
Now using node v16.13.0 (npm v8.1.0)
/tmp/so_example » nvm use 15
Now using node v15.14.0 (npm v7.7.6)
/tmp/so_example » nvm use 14
Now using node v14.18.1 (npm v6.14.15)
Update: Docker
I've also tried the same installation on Docker following this guide. With this setup it seems to work. This suggests it is an OS/package related issue.
/tmp/so_example » echo "const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless: true,
args: [
'--disable-gpu',
'--disable-dev-shm-usage',
'--disable-setuid-sandbox',
'--no-sandbox',
]
});
const page = await browser.newPage();
await page.goto('https://google.com');
await browser.close();
console.log('If I made it here there is no error');
})();" > example.js
/tmp/so_example » echo "FROM node:17-slim
# Chrome dependencies
RUN apt-get update && apt-get -f install -y \\
fonts-liberation \\
gconf-service \\
#libappindicator1 \\
libasound2 \\
libatk1.0-0 \\
libcairo2 \\
libcups2 \\
libfontconfig1 \\
libgbm-dev \\
libgdk-pixbuf2.0-0 \\
libgtk-3-0 \\
libicu-dev \\
libjpeg-dev \\
libnspr4 \\
libnss3 \\
libpango-1.0-0 \\
libpangocairo-1.0-0 \\
libpng-dev \\
libx11-6 \\
libx11-xcb1 \\
libxcb1 \\
libxcomposite1 \\
libxcursor1 \\
libxdamage1 \\
libxext6 \\
libxfixes3 \\
libxi6 \\
libxrandr2 \\
libxrender1 \\
libxss1 \\
libxtst6 \\
xdg-utils
COPY . ./
RUN npm install
# Make browser executable for puppeteer
RUN chmod -R o+rwx node_modules/puppeteer/.local-chromium
CMD [\"node\", \"example.js\"]" > Dockerfile
/tmp/so_example » docker run -it $(docker build -q .)
If I made it here there is no error
Edit: static chromium path
As commented on this question, adding
executablePath: 'path/to/local/chromium'
to the puppeteer configuration makes the reproduction run on the system. I would still like to know why the chromium packaged with puppeteer does not work as using a static path to a local executable is a really bad practice in a multi-dev environment.

Surprisingly, after updating to Puppeteer version 12.0.0, everything seems to work. As of yet I do not know what caused the issue and what made it go away, but it works now.
EDIT: The changelog can be found here, and presumably the update to Chromium 97.0.4692.0 is what resolved the issue.

There's too much for me to put this in a comment, so I will summarize here. Maybe it will help you, or someone else. I should also mention this is for RHEL EC2 instances behind a corporate proxy (not Arch Linux), but I still feel like it may help. I had to do the following to get puppeteer working. This is straight from my docs, but I had to hand-jam the contents because my docs are on an intranet.
I had to install all of these libraries manually. I also don't know what the Arch Linux equivalents are. Some are duplicates from your question, but I don't think they all are:
pango libXcomposite libXcursor libXdamage libXext libXi libXtst cups-libs libXScrnSaver libXrandr GConf2 alsa-lib atk gtk3 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc liberation-mono-fonts liberation-narrow-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts glib2
If Arch Linux uses SELinux, you may also have to run this:
setsebool -P unconfirmed_chrome_sandbox_transition 0
It is also worth adding dumpio: true to your options to debug. Should give you a more detailed output from puppeteer, instead of the generic error. As I mentioned in my comment. I have this option ignoreDefaultArgs: ['--disable-extensions']. I can't tell you why because I don't remember. I think it is related to this issue, but also could be related to my corporate proxy.

Related

Unable to start more than docker containers (Ubuntu vServer)

I am currently desperately looking for help. I am trying to get my server up and running using docker containers but it seems I have hit a wall.
I have rented a vServer (4 Cores, 8 GB RAM) and I am trying to get everything up and running.
A brief overview of my idea:
Traefik as reverse proxy to distribute my applications
Crowdsec for security and traefik middleware
As Applications: Gitea, Nextcloud and a basic Apache/PHP Web-Server
Watchtower managing updates
I installed everything using docker compose images, and it works but has one major flaw:
I am unable to start every container.
At first, I thought everything worked until I realised that the last container I started, forced another container to exit with Code 137.
To avoid that I added resource limits to my docker-compose.yml files:
deploy:
resources:
limits:
cpus: '0.001'
memory: 50M
reservations:
cpus: '0.0001'
memory: 20M
I populated the values as I seemed fit for each container. After that, no container was shut down again, but now I am unable to get the last container up (It's not any specific container, just the last container I try to start.).
I get one of the following three error messages:
$ docker compose up -d
[+] Running 3/4
⠿ Network nextcloud_default Created 3.5s
⠿ Container nextcloud-redis Started 1.3s
⠿ Container nextcloud-db Starting 2.1s
⠿ Container nextcloud-app Created 0.2s
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 2, stdout: , stderr: runtime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abort
goroutine 0 [idle]:
runtime: unknown pc 0x7f6605cd0a7c
stack: frame={sp:0x7ffd4137b1a0, fp:0x0} stack=[0x7ffd40b7c810,0x7ffd4137b850)
0x00007ffd4137b0a0: 0x000055de6cee2154 <runtime.funcspdelta+0x0000000000000034> ...
$ docker compose up -d
...
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: failed to write "380000": write /sys/fs/cgroup/cpu,cpuacct/docker/dfbfa79b7a987b1248a5498fbd6fe4438a68cb0e147a3285a8638a845193f4bf/cpu.cfs_quota_us: invalid argument: unknown
Or with sudo:
$ sudo docker compose up -d
...
Error response from daemon: failed to create shim task: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/dfbfa79b7a987b1248a5498fbd6fe4438a68cb0e147a3285a8638a845193f4bf/log.json: no such file or directory): runc did not terminate successfully: exit status 2: unknown
I did absolutely nothing in between these commands, and I got different error messages. Huh?
I think it might be some resource issue, but inspecting the server with htop or my containers with docker stats shows the absolute opposite. CPU idles at 1-5% and 800M of 8GB RAM are used.
After some research I found this but my understanding of the linux OS is not that deep, that I can certainly say this has something to do with my issue. Furthermore, I don't get how I would set systemd.unified_cgroup_hierarchy=0.
I tried to increase vm.min_free_kbytes and took a look at
$ ulimit
unlimited
and obviously searched the internet. But sadly, I didn't find any exact matching issues. (Or I didn't use the correct buzzwords as my understanding of Linux is not that deep.)
Any idea would be much apprecheated!
Thanks!
P.S.: Here are some version details of my server:
$ docker --version
Docker version 20.10.23, build 7155243
$ uname -r
5.2.0
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) CPU E5-2680 v3 # 2.50GHz
CPU family: 6
Model: 63
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
Stepping: 2
BogoMIPS: 4994.44
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nons
top_tsc aperfmperf eagerfpu cpuid_faulting pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand
lahf_lm abm epb invpcid_single intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pt
s md_clear spec_ctrl intel_stibp flush_l1d
Virtualization features:
Virtualization: VT-x
Hypervisor vendor: Parallels
Virtualization type: container
Caches (sum of all):
L1d: 128 KiB (4 instances)
L1i: 128 KiB (4 instances)
L2: 1 MiB (4 instances)
L3: 30 MiB (1 instance)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
Ok I have found the issue.
My hosting provider has a process limit on their VMs. I asked them to increase it, and now my issue is gone.

How to solve "Java Failed to write core dump ..." for Rstudio running in EMR

I'm running a data preparation script with Sparklyr on Rstudio (running in EMR). The code exuction crashes and I got this error report I don't understand properly:
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f99b77fb968, pid=12298, tid=0x00007f99b8167940
#
# JRE version: OpenJDK Runtime Environment (8.0_171-b10) (build 1.8.0_171-b10)
# Java VM: OpenJDK 64-Bit Server VM (25.171-b10 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libR.so+0xbe968]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
/proc/meminfo:
MemTotal: 32949048 kB
MemFree: 11480880 kB
MemAvailable: 19345760 kB
Buffers: 455776 kB
Cached: 5598268 kB
SwapCached: 0 kB
Active: 14572612 kB
Inactive: 3704688 kB
Active(anon): 12223280 kB
Inactive(anon): 48 kB
Active(file): 2349332 kB
Inactive(file): 3704640 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 748 kB
Writeback: 0 kB
AnonPages: 12223264 kB
Mapped: 198336 kB
...
I want to know how to fix the problem so my code could run entirely ?
Thanks in advance !

different CPU cache size reported by /sys/device/ and dmidecode

I'm trying to get the size of different cache level in my system.
I tried two techniques.
a) Using information from /sys/device. Here is the output.
$ cat /sys/devices/system/cpu/cpu0/cache/index1/size
32K
$ cat /sys/devices/system/cpu/cpu0/cache/index2/size
256K
$ cat /sys/devices/system/cpu/cpu0/cache/index3/size
8192K
b) Using information from dmidecode
$ sudo dmidecode -t cache
Cache Information
Socket Designation: CPU Internal L1
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Through
Location: Internal
Installed Size: 256 KB
Maximum Size: 256 KB
< .... >
Cache Information
Socket Designation: CPU Internal L2
Configuration: Enabled, Not Socketed, Level 2
Operational Mode: Write Through
Location: Internal
Installed Size: 1024 KB
Maximum Size: 1024 KB
< .... >
Cache Information
Socket Designation: CPU Internal L3
Configuration: Enabled, Not Socketed, Level 3
Operational Mode: Write Back
Location: Internal
Installed Size: 8192 KB
Maximum Size: 8192 KB
< .... >
The size reported for L2 and L3 cache is different. Any ideas as to a) why this discrepancy? b) Which method gives the correct value?
Other related information:
$uname -a
Linux 3.0.0-14-generic #23somerville3-Ubuntu SMP Mon Dec 12 09:20:18 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3770 CPU # 3.40GHz
stepping : 9
cpu MHz : 2400.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 6784.23
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
< ... >
A few things:
You have a quad-core CPU
The index<n> name in /sys/devices/system/cpu/cpu<n>/cache does not correspond to L1/L2/L3 etc. There is a .../index<n>/level file that will tell you the level of the cache.
Your L1 cache is split into two caches (likely index0 and index1), one for data, and one for instructions (see .../index<n>/type), per core. 4 cores * 2 halves * 32K matches the 256K that dmidecode reports.
The L2 cache is split per-core. 4 cores * 256K (from index2) = 1024K, which matches dmidecodes L2 number.

Java segmentation fault at libglib (Red Hat Enterprise Linux Server release 5.5)

has anyone ever seen the following Java segmentation fault at libglib g_list_last? The stack shows nothing more than the g_list_last and it says that "Current thread is native thread".
The Java 6 VM was running JBOSS 6 and there was no custom native code.
The server runs normally for some hours and then breaks... always with the exactly same error. I'm posting the most interesting excerpts from the hs_err file.
Thanks in advance for any clue!
Regards,
Doug
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000003e5022a5e3, pid=14845, tid=1196464448
#
# JRE version: 6.0_23-b05
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libglib-2.0.so.0+0x2a5e3] g_list_last+0x13
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread is native thread
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000010068f06abb
Registers:
RAX=0x0000010068f06ab3, RBX=0x000000004d59ee10, RCX=0x000000004e60aeb0, RDX=0x0000000000000000
RSP=0x0000000047508e18, RBP=0x00002aaab9afcca0, RSI=0x00002aaab9afcca0, RDI=0x0000010068f06ab3
R8 =0x0000000000000001, R9 =0x0000000000003a93, R10=0x0000000000000000, R11=0x0000003e5022abb0
R12=0x000000047c6556b8, R13=0x00002aaab8c7a3f0, R14=0x000000004d698e40, R15=0x000000004da3c4b0
RIP=0x0000003e5022a5e3, EFL=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
TRAPNO=0x000000000000000e
...
R11=0x0000003e5022abb0
0x0000003e5022abb0: g_list_append+0 in /lib64/libglib-2.0.so.0 at 0x0000003e50200000
R12=0x000000047c6556b8
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb]
Stack: [0x00000000474c9000,0x000000004750a000], sp=0x0000000047508e18, free space=255k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libglib-2.0.so.0+0x2a5e3] g_list_last+0x13
--------------- P R O C E S S ---------------
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
PSYoungGen total 4767296K, used 4345622K [0x00000006c2800000, 0x0000000800000000, 0x0000000800000000)
eden space 4368704K, 99% used [0x00000006c2800000,0x00000007caaac208,0x00000007cd250000)
from space 398592K, 4% used [0x00000007cd250000,0x00000007ce369990,0x00000007e5790000)
to space 373184K, 0% used [0x00000007e9390000,0x00000007e9390000,0x0000000800000000)
PSOldGen total 10403840K, used 1828930K [0x0000000447800000, 0x00000006c2800000, 0x00000006c2800000)
object space 10403840K, 17% used [0x0000000447800000,0x00000004b7210910,0x00000006c2800000)
PSPermGen total 288448K, used 288427K [0x0000000347800000, 0x00000003591b0000, 0x0000000447800000)
object space 288448K, 99% used [0x0000000347800000,0x00000003591aaf10,0x00000003591b0000)
...
--------------- S Y S T E M ---------------
OS:Red Hat Enterprise Linux Server release 5.5 (Tikanga)
uname:Linux 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64
libc:glibc 2.5 NPTL 2.5
rlimit: STACK 10240k, CORE 0k, NPROC 1056767, NOFILE 16384, AS infinity
load average:1.01 0.58 0.40
/proc/meminfo:
MemTotal: 132086452 kB
MemFree: 12656648 kB
Buffers: 1441372 kB
Cached: 107627992 kB
SwapCached: 0 kB
Active: 77778444 kB
Inactive: 39851400 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 132086452 kB
LowFree: 12656648 kB
SwapTotal: 61440552 kB
SwapFree: 61440552 kB
Dirty: 864 kB
Writeback: 0 kB
AnonPages: 8560164 kB
Mapped: 84312 kB
Slab: 1645472 kB
PageTables: 31956 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 127483776 kB
Committed_AS: 20373196 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 297932 kB
VmallocChunk: 34359436991 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
CPU:total 32 (8 cores per cpu, 2 threads per core) family 6 model 47 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht
Memory: 4k page, physical 132086452k(12656648k free), swap 61440552k(61440552k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (19.0-b09) for linux-amd64 JRE (1.6.0_23-b05), built on Nov 12 2010 14:12:21 by "java_re" with gcc 3.2.2 (SuSE Linux)

HPUX machinfo equivalent for Linux? or What hardware am I using?

In HPUX the command "machinfo" list machine information such as Number of CPUs, Clock speed, Bus speed, processor type, Cache information, total memory, and OS version information.
Is there an equivalent Linux utility?
There are a lot of files in /proc that contain information about the system, e.g /proc/cpuinfo, /proc/meminfo etc. See the man page of proc for more details.
There are also some utilities which may help you, although some of these may not be installed:
dmidecode
x86info
lspci
lsusb
uname
... and there are probably others, some of which are distribution-dependent.
cat /proc/cpuinfo and cat /proc/meminfo are most likely what you are looking for:
CPU information:
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T7700 # 2.40GHz
stepping : 10
cpu MHz : 800.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm ida
bogomips : 4792.63
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T7700 # 2.40GHz
stepping : 10
cpu MHz : 800.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm ida
bogomips : 4787.77
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
Memory information:
$ cat /proc/meminfo
MemTotal: 3977260 kB
MemFree: 26224 kB
Buffers: 141712 kB
Cached: 1190744 kB
SwapCached: 20 kB
Active: 2452144 kB
Inactive: 966032 kB
SwapTotal: 2097144 kB
SwapFree: 2051636 kB
Dirty: 10984 kB
Writeback: 0 kB
AnonPages: 2085712 kB
Mapped: 171640 kB
Slab: 364212 kB
SReclaimable: 323032 kB
SUnreclaim: 41180 kB
PageTables: 29032 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 4085772 kB
Committed_AS: 3231676 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 20564 kB
VmallocChunk: 34359716859 kB

Resources