10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
hi unix expert
is there any program in terminal to show cpu and ram information? and usage of this?
Many thanks
samad (3 Replies)
Discussion started by: abdossamad2003
3 Replies
2. Shell Programming and Scripting
OS: AIX
so we frequently receive a lot of cpu related alerts. all types of checks have been created to keep an eye on the cpu but a lot of these checks make too much noise as the CPU is always being seen as high. the system and application owners say there's no issue with the cpu.
so now,... (6 Replies)
Discussion started by: SkySmart
6 Replies
3. AIX
Hi All ,
I am trying to pull out below things from AIX machine (any type)
1. number of physical processor
2. number of logical processsors
3. Total number of processors (physical plus logical)
4. total number of cores
5. list of installed applications with versions and vendor name
... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies
4. Shell Programming and Scripting
i am using the below command in order to find the cpu utilization by a user..now i want to mail if the cpu utilization goes beyond 5%....can someone please help me ?
ps auxw | sort -r +2 | awk '{ print $3,$1 }' | head -6 | egrep "USER|#anonymous#"
%CPU USER
2.0 anonymous
Regards,... (6 Replies)
Discussion started by: arorap
6 Replies
5. AIX
Hi,
I'm trying to create a script to catch a process which is consuming high CPU which I have pretty much done but it's just finding the correct place to pull the current CPU for that process.
When viewed in Topas it's consuming 99.*% cpu
But if I try using
ps avg or ps -eo pcpu
... (5 Replies)
Discussion started by: elmesy
5 Replies
6. AIX
Hi,
may be this is an AIX noob question:
my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (5 Replies)
Discussion started by: DarthVader77
5 Replies
7. AIX
Hi.
I am looking for a command that will return me the amount of CPU used by a specific process in AIX environment.
I know there is TOPAS - but it is interactive and I need to get this information from system that connects remotely via SSH.
Using writing to files and than reading them is also... (1 Reply)
Discussion started by: yamsin789
1 Replies
8. UNIX for Dummies Questions & Answers
hi,
i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies
9. AIX
Hello All,
I wanna find the CPU utilization of a specific process running on AIX OS. I have its pid, but not sure about the command.
iostat
sar 5 5
vmstat
All the above give me system CPU utilization. Is there a way to find for a specific pid???
Thanks,
Ankita (11 Replies)
Discussion started by: Ankita
11 Replies
10. Programming
I have written a program to collect some performance metrics on and AIX box, but I'm having difficultly getting the process information.
I'm lead to believe that I'm not getting the correct information because I'm trying to run the program on AIX 5.1 (5100-03), but I'm not convinced as the... (0 Replies)
Discussion started by: StuBob
0 Replies
POSIX_MADVISE(3) Linux Programmer's Manual POSIX_MADVISE(3)
NAME
posix_madvise - give advice about patterns of memory usage
SYNOPSIS
#include <sys/mman.h>
int posix_madvise(void *addr, size_t len, int advice);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
posix_madvise():
_POSIX_C_SOURCE >= 200112L
DESCRIPTION
The posix_madvise() function allows an application to advise the system about its expected patterns of usage of memory in the address range
starting at addr and continuing for len bytes. The system is free to use this advice in order to improve the performance of memory
accesses (or to ignore the advice altogether), but calling posix_madvise() shall not affect the semantics of access to memory in the speci-
fied range.
The advice argument is one of the following:
POSIX_MADV_NORMAL
The application has no special advice regarding its memory usage patterns for the specified address range. This is the default
behavior.
POSIX_MADV_SEQUENTIAL
The application expects to access the specified address range sequentially, running from lower addresses to higher addresses.
Hence, pages in this region can be aggressively read ahead, and may be freed soon after they are accessed.
POSIX_MADV_RANDOM
The application expects to access the specified address range randomly. Thus, read ahead may be less useful than normally.
POSIX_MADV_WILLNEED
The application expects to access the specified address range in the near future. Thus, read ahead may be beneficial.
POSIX_MADV_DONTNEED
The application expects that it will not access the specified address range in the near future.
RETURN VALUE
On success, posix_madvise() returns 0. On failure, it returns a positive error number.
ERRORS
EINVAL addr is not a multiple of the system page size or len is negative.
EINVAL advice is invalid.
ENOMEM Addresses in the specified range are partially or completely outside the caller's address space.
VERSIONS
Support for posix_madvise() first appeared in glibc version 2.2.
CONFORMING TO
POSIX.1-2001.
NOTES
POSIX.1 permits an implementation to generate an error if len is 0. On Linux, specifying len as 0 is permitted (as a successful no-op).
In glibc, this function is implemented using madvise(2). However, since glibc 2.6, POSIX_MADV_DONTNEED is treated as a no-op, because the
corresponding madvise(2) value, MADV_DONTNEED, has destructive semantics.
SEE ALSO
madvise(2), posix_fadvise(2)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2017-09-15 POSIX_MADVISE(3)