does any one have any ideas how i would go about calculating the number of days left in the month from a bash script ?. I want to do some operations on a csv file according to the result (8 Replies)
Hi all
I have a variable called "variable" and is of the form
variable ="AAA BBB CCC DDD" {basically it has values separated by spaces}
What is the simplest way to check if "variable" has more that one value in its list?
Thanks. (9 Replies)
Hi All,
I have an issue with calculating the network number that needs to be put in /etc/netmasks file in my Sol-9 server.
The IP of my server in 10.164.114.135
Default Gateway - 10.164.114.130
Netmask - 255.255.255.240
If I set "10.164.114.130 255.255.255.240" in netmask file, after... (2 Replies)
Hi,
plz see the below code.
here my aim is to calculate the number of lines in unprocessedData.out
if this file contains 40 lines then lastly $linenum should print 40.(except blank lines)
i have tried below code but it giving me the output only one. can anyone help me how to do ?
... (9 Replies)
I wrote the day calculator also in bash. I would like to now, that is it good so?
#!/bin/bash
datum1=`date -d "1991/1/1" "+%s"`
datum2=`date "+%s"`
diff=$(($datum2-$datum1))
days=$(($diff/(60*60*24)))
echo $days
Thanks in advance for your help! (3 Replies)
Hi,
Please help me to find how to calculate the number of TPS supported by any solaris server for example one server with below configuration .
Sun Blade X6270 with two 4-core processors
2 x 300 GB internal disk drives (2 Replies)
Hi,
I want to get total number of cores on my all non-global zones on Solaris 10. I got two methods and both are giving different results. Below link is a script, which tells me that total cores are 8
Mandalika's scratchpad: Oracle Solaris: Show Me the CPU, vCPU, Core Counts and the... (4 Replies)
Discussion started by: ron323232
4 Replies
LEARN ABOUT CENTOS
get_hugepage_region
GET_HUGEPAGE_REGION(3) Library Functions Manual GET_HUGEPAGE_REGION(3)NAME
get_hugepage_region, free_hugepage_region - Allocate and free regions of memory that use hugepages where possible
SYNOPSIS
#include <hugetlbfs.h>
void *get_hugepage_region(size_t len, ghr_t flags);
void free_hugepage_region(void *ptr);
DESCRIPTION
get_hugepage_region() allocates a memory region len bytes in size backed by hugepages. Hugepages may be of benefit to applications that use
large amounts of address space and suffer a performance hit due to TLB misses. Wall-clock time or oprofile can be used to determine if
there is a performance benefit from using hugepages or not.
Unlike get_huge_pages(), len does not have to be hugepage-aligned although memory may be wasted due to alignment. The caller may also spec-
ify that base pages be used in the event there are no hugepages available.
The flags argument changes the behaviour of the function. Flags may be or'd together.
GHR_FALLBACK
Use base pages if there are an insufficient number of huge pages.
GHR_STRICT
Use hugepages or return NULL.
GHR_COLOR
When specified, bytes that would be wasted due to alignment are used to color the buffer by offsetting it by a random cacheline
within the hugepage. This avoids a performance problem whereby multiple buffers use the same cache lines at the same offsets. If it
is not important that the start of the buffer be page-aligned, specify this flag.
GHR_DEFAULT
The library chooses a sensible combination of flags for allocating a region of memory. The current default is: GHR_FALLBACK |
GHR_COLOR
free_hugepage_region() frees a region of memory allocated by get_hugepage_region(). The behaviour of the function if another pointer is
used, valid or otherwise, is undefined.
RETURN VALUE
On success, a pointer is returned for to the allocated memory. On error, NULL is returned. errno will be set based on what the failure of
mmap() was due to.
SEE ALSO oprofile(1) , gethugepagesize(3) , get_huge_pages(3) , libhugetlbfs(7)AUTHORS
libhugetlbfs was written by various people on the libhugetlbfs-devel mailing list.
November 7, 2008 GET_HUGEPAGE_REGION(3)