10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I've worked how to add page numbers based on regex. It's using the footer text.
How do we get the total amount added so we have page number with the total number of pages?
Desired output: Page No:1 of 5
Thanks in advance. (15 Replies)
Discussion started by: tugar
15 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have requirement for automation, wanna confirm whether is it possible in shell scripting.
1) Need to read data from excel sheet
2) And upload the details in html page
I know first requirement is possible by converting excel into csv form, but not sure about the second one.
If... (6 Replies)
Discussion started by: stew
6 Replies
3. Shell Programming and Scripting
Solved with iptables.
Many thanks...
Hello,
Objective:
What I would like to accomplish is :
- To read file1 line by line and search each word in file2.
- To grab corresponding ip addresses found in file2
- To send related ip addresses to fail2ban (not iptables)
By this way, when I... (5 Replies)
Discussion started by: baris35
5 Replies
4. UNIX for Dummies Questions & Answers
Good afternoon,
I wonder how i could use unix commands to ease the reading of long command result output ?
like the "php -i" or any other command that returns a long answer.
I could not find the right terms to Google it or search the forum. Therefore I bother you with this question.
... (3 Replies)
Discussion started by: Mat_k
3 Replies
5. Red Hat
Hi All,
Thanks for reading.
I am not sure if I am asking this in the correct group. But here it goes:
There is a shell script which does some system checks and creates an html file called system_summary.html on my Red Hat machine say in /reports directory every hour.
Now I want to view it... (6 Replies)
Discussion started by: deepakgang
6 Replies
6. Infrastructure Monitoring
I need to update my scripts. I have been using depreciated oids.
I referred to the Cisco site docs and found
snmpset -v 2c -c .1.3.6.1.4.1.9.9.96.1.1.1.1.2. i 1
.1.3.6.1.4.1.9.9.96.1.1.1.1.3. i 4
.1.3.6.1.4.1.9.9.96.1.1.1.1.4. i 1
.1.3.6.1.4.1.9.9.96.1.1.1.1.5. a ""... (0 Replies)
Discussion started by: popeye
0 Replies
7. Web Development
I am planning to create an html page that will count number of connected ports, challenge for me is how to put it in a page. Thanks! (1 Reply)
Discussion started by: webmunkey23
1 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
In our unix server we have an apache web server running. I can access the default apache web page from my windows machine.
Now, I want to create my own webpage. Therefore I created webpage at /export/home/myname/test.html file. Where do I need to place this file and what do I need... (2 Replies)
Discussion started by: pkm_oec
2 Replies
9. Solaris
Hi All,
In our unix server we have an apache web server running. I can access the default apache web page from my windows machine.
Now, I want to create my own webpage. Therefore I created webpage at /export/home/myname/test.html file. Where do I need to place this file and what do I need... (0 Replies)
Discussion started by: pkm_oec
0 Replies
10. Shell Programming and Scripting
I'm trying to write the filenames only to a file. The following line works:
ls -l /home/alex >> log/filetrack.log
But the file filetrack.log also contains the "total" i.e. the first line is total 3462984
Also, I would like only the filename, date and size to be listed. However, my main... (3 Replies)
Discussion started by: rx82000
3 Replies
sg_get_mem_stats(3) Library Functions Manual sg_get_mem_stats(3)
NAME
sg_get_mem_stats, sg_get_swap_stats - get VM statistics
SYNOPSIS
#include <statgrab.h>
sg_mem_stats *sg_get_mem_stats(void);
sg_swap_stats *sg_get_swap_stats(void);
DESCRIPTION
Memory statistics are accessed through the sg_get_mem_stats function. It returns a pointer to a static sg_mem_stats.
The sg_get_swap_stats returns returns swap statistics. It returns a pointer to a static sg_swap_stats.
On the FreeBSD operating system elevated privileges are required to access the swap statistics. Making the program setgid kmem should be
sufficient. Programs running as root will not have this problem.
RETURN VALUES
The VM system calls can return a pointer to either a sg_mem_stats or a sg_swap_stats.
typedef struct{
long long total;
long long free;
long long used;
long long cache;
}sg_mem_stats;
total The total amount of memory in bytes.
free The total free memory in bytes.
used The total used memory in bytes.
cache The amount of cache used in bytes.
typedef struct{
long long total;
long long used;
long long free;
}sg_swap_stats;
total The total swap space in bytes.
used The used swap in bytes.
free The free swap in bytes.
TODO
Add a function to hold open the file descriptor to the kernel memory structures. Doing this would allow the elevated privileges to be
dropped early on.
SEE ALSO
statgrab(3)
WEBSITE
http://www.i-scream.org/libstatgrab/
i-scream $Date: 2005/04/25 11:25:45 $ sg_get_mem_stats(3)