Comments (4)
Hmm, do we speak about kernel zone? I have made a test case:
#!/bin/bash
set -x
KSTAT2=/usr/bin/kstat2
PAGE_SIZE=$(/usr/bin/pagesize)
TOTAL_MEMORY_PAGES=$($KSTAT2 -p kstat:/vm/usage/memory:mem_total | cut -f 2)
FREE_MEMORY_PAGES=$($KSTAT2 -p kstat:/pages/unix/system_pages:freemem | cut -f 2)
ZFS_MEMORY_PAGES=$($KSTAT2 -p kstat:/vm/usage/memory:mem_zfs | cut -f 2)
AVAILABLE_MEMORY_PAGES=$(( $FREE_MEMORY_PAGES + $ZFS_MEMORY_PAGES ))
AVAILABLE_MEMORY_PERCENTAGE=$(( 100*$AVAILABLE_MEMORY_PAGES/$TOTAL_MEMORY_PAGES ))
In my zone I have
$ prtconf | head -2
System Configuration: Oracle Corporation i86pc
Memory size: 4094 Megabytes
$ bash a.sh
+ KSTAT2=/usr/bin/kstat2
++ /usr/bin/pagesize
+ PAGE_SIZE=4096
++ /usr/bin/kstat2 -p kstat:/vm/usage/memory:mem_total
++ cut -f 2
+ TOTAL_MEMORY_PAGES=1047965
++ /usr/bin/kstat2 -p kstat:/pages/unix/system_pages:freemem
++ cut -f 2
+ FREE_MEMORY_PAGES=555988
++ /usr/bin/kstat2 -p kstat:/vm/usage/memory:mem_zfs
++ cut -f 2
+ ZFS_MEMORY_PAGES=162092
+ AVAILABLE_MEMORY_PAGES=718080
+ AVAILABLE_MEMORY_PERCENTAGE=68
That looks ok to me. Would you mind running that snipped and/or be more specific about the errors, please?
from solaris-userland.
no, not on kernel zone, in simple locale zone
from solaris-userland.
On Solaris 11.4? kstat2 was introduced in 11.4, so this won't work on older releases, but neither will many other things in the Userland build.
from solaris-userland.
Thanks, this explains it!
from solaris-userland.
Related Issues (15)
- looking for Inf/NaN vs inf/nan patches for SPARC Solaris 11 gcc 5 HOT 6
- Samba: Component "samba-tool" is missing HOT 2
- setup for solaris-userland fails because host ipkg.us.oracle.com doesn't resolve HOT 4
- rust 1.53.0 can't bootstrap rust 1.61.0 HOT 5
- "gmake download" fails to correctly locate various original source distributions HOT 3
- building rust 1.60.0 on SPARC with 1.59.0 fails w/ lint error
- gcc13 installation does not install static libstdc++.a HOT 6
- mailman having uid 98 triggers compliance check for system accounts HOT 3
- racecondition() HOT 4
- Typo in solaris-userland/components/net-snmp/Makefile, change 'B' with 'D' HOT 3
- Missing Firefox and Cargo HOT 2
- ModuleNotFoundError: No module named 'pkg' HOT 3
- Upstream userland patches HOT 1
- Clone and Download not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solaris-userland.