Unix OS

33K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi,

   I have called third-party  api from main thread in c++ on linux which is working fine as expected. But, when I call same api from child thread, it's failing in multi threaded application.

   technically what could be the reason? (not interested to check with third-party people).

Thanks,
bvm
0
CompTIA Network+
LVL 13
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

I am running Redhat 6.9 and i am investgating an intermittent connectivity problem with a health checking ping between an F5 loadbalancer and a vmware virtual server running Redhat 6.9

The server is showing in the vmware log vmsvc that the max number of static routes 100 has been reached. However, the max_size for the routing cache is 8388608. Do you know if this kernel setting for the max size in the routing table is the same as the max. routes in the routing table?  I have googled the vmsvc error and apparently upgrading to a later version of the package gets rid of the errors but I'd also like to understand the setting for the maximum number of static routes allowed on a Redhat server.

cat /proc/sys/net/ipv4/route/max_size
8388608

Thanks for any assistance with this.
0
Hello,
Preamble, I have inherited a Solaris 10 system that is running Zones.  The server was moved from one data center to another and the network has been changed.  I am not clear on how to re-configure the zones to function on the new network.  I have read many of the Oracle documents online but they seem to only refer to setting up new zones and not re-configuring existing zones.

Update, some information:
Current output
# ifconfig -a

netmask ffffffe0  == 255.255.255.224

bge1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        zone abc – 
        inet	 ABC.XYZ.197.75 netmask ffffffe0 broadcast ABC.XYZ.197.95
				
bge1:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        zone xyz
        inet	ABC.XYZ.197.69 netmask ffffffe0 broadcast ABC.XYZ.197.95

Open in new window

Required to be updated to be this:
netmask  fffffff0  == 255.255.255.240

bge1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        zone abc – 
        inet	 ABC.XYZ.36.182 netmask fffffff0 broadcast ABC.XYZ.36.191
				
bge1:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        zone xyz
        inet	ABC.XYZ.36.183 netmask fffffff0 broadcast ABC.XYZ.36.191

Open in new window

The output from the zonecfg command is:
zone abc
ip-type=shared
address=ABC.XYZ.197.75
physical=bge1
defrouter=ABC.XYZ.197.65

zone xyz
ip-type=shared
address=ABC.XYZ.197.69
physical=bge1
defrouter=ABC.XYZ.197.65

Open in new window

Need to change to:
zone abc
ip-type=shared
address=ABC.XYZ.36.182
physical=bge1
defrouter=ABC.XYZ.36.177

zone xyz
ip-type=shared
address=ABC.XYZ.36.182
physical=bge1
defrouter=ABC.XYZ.36.177

Open in new window


Any assistance would be greatly appreciated.  Please and thanks!
0
Hi Experts,
 We have some application that we are migrating from one environment to another environment. We have some tomcat , Database server Apache and batch servers for this application. We will have new host/server for this application.  Our job is to find some old server name references and replace with new one specially database server for connection string for java application in config file or any location.

We are using Putty to log on those unix servers. We don't want to manually find one by one in all the file and replace it.

Is there any way or script to find those instances and replace automatically?
0
Hi everyone,
We are trying to migrate from AIX 6100-09-01-1341 to AIX 7100-05-03-1837 on 2 VMs. One VM only shows preservation and New and Complete Install while another VM only shows New and Complete Install option. Here are additional comments:
1. VM 1: Can log on to AIX 6.1 and works fine
2. VM 2: Cannot log on to AIX 6.1. The system does not even provide a logon screen.

Regards,
0
I had this question after viewing Sun Solaris 10 (Sparc) - How to enable telnet ?.

Please share the solution
0
Hi,

  compiling xerces on solaris box.
 
  /usr/lib/sparcv9/ and /usr/lib/64 have libicu*54.  
 
  In another location, /icu_needs_to_build_with/libicu*44.
 
  Whenver I compile, it's always picking libicu*54 version. I do want to build xerces with libicu*44 libraries.
 
  Do we have any flags like LDFLAGS or xyz to configure specific version shared libs?
 
 Thanks,
 Bvm.
0
We have a Sparc Enterprise M3000 which had a disk out a while ago. An Oracle engineer came out & replaced it.

We noticed today that the same slot has a solid green light. I ran a df -k and got the following results -

Filesystem                   kbytes           used            avail              capacity          Mounted on
/dev/md/dsk/d10       68158426    13480606   53996236     20%                 /
/devices                        0                    0                  0                     0%                 /devices
ctfs                                0                    0                  0                      0%                 /system/contract
proc                              0                    0                  0                      0%                 /proc
mnttab                         0                     0                 0                      0%                 /etc/mnttab
swap                            9544856        1768          9543088          1%                /etc/svc/volatile
objfs                              0                    0                   0                    0%                /system/object
sharefs                         0                    0                   0                    0%              /etc/dfs/sharetab
fd                                   0                    0                   0                    0%              /dev/fd
/dev/md/dsk/d30       4135998       3915557      179082        96%          …
0
Hi expert

How to find the latest patching and before patching in Centos OS 7, is this the correct i have try look into the "grep Updated: /var/log/yum.log | tail -30" to look for the latest.

what is the command to look for , before patching in Centos OS 7.
0
Hello.

The customer complains a slowness in the transactions, from the analysis of the following output
you can understand if you need to change some configuration parameter ?


[root@MdapEtlA01 /] $ mmdiag --stats

=== mmdiag: stats ===
Global resources:
  OpenFile counts: total created 256020 (in use 256000, free 20)
    using 552000K memory
    cached 256000, currently open 4918+172, cache limit 256000 (min 10, max 256000), eff limit 256000
    stats: steals 179591029 (clean 179531269, dirty 59760)
  StatCache counts: total created 256007 (in use 256000, free 7)
    using 78000K memory
    cache limit 256000
    stats: inserts 179766566 steals 157897245 hits 14489 expands 17496150 revokes 127 uses 11359975
  OpenInstance counts: total created 25607 (in use 18865, free 6742)
    using 10316K memory
  BufferDesc counts: total created 118726 (in use 117677, free 1049)
    using 11643K memory
    cached 117677 cache limit 786432 pseudo 31894 prefetch 516
  indBlockDesc counts: total created 206656 (in use 196663, free 9993)
    using 7811K memory
    cached 196663 cache limit 256000 pseudo 194377

My verison of gpfs :

[root@MdapEtlA01 /] $ lslpp -L 'gpfs*'
  Fileset                      Level  State  Type  Description (Uninstaller)
  ----------------------------------------------------------------------------
  gpfs.base                 3.5.0.15    C     F    GPFS File Manager
  gpfs.docs.data             3.5.0.4    C     F    GPFS Server …
0
CompTIA Cloud+
LVL 13
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

I connected to the vios  an "integrated multifunction card with copper sfp" , now I would like to create an adapter to associate a usb port to the lpar, how should I do?

System Model: IBM,9179-MHC

by vios :
# lsdev | grep Multifunction
ent44      Available 0J-00       Int Multifunction Card w/ Copper SFP+ 10GbE (a219100714100a04)
ent45      Available 0J-01       Int Multifunction Card w/ Copper SFP+ 10GbE (a219100714100a04)
ent46      Available 0J-04       Int Multifunction Card w/ Base-TX 10/100/1000 1GbE (a21910071410d203)
ent47      Available 0J-05       Int Multifunction Card w/ Base-TX 10/100/1000 1GbE (a21910071410d203)
# lslpp -l | grep usb
  devices.common.IBM.usb.diag
  devices.common.IBM.usb.rte
  devices.usbif.010100.rte   6.1.7.0  COMMITTED  USB Audio Device Driver
  devices.usbif.03000008.rte
  devices.usbif.030101.rte   6.1.7.0  COMMITTED  USB Keyboard Client Driver
  devices.usbif.030102.rte   6.1.7.0  COMMITTED  USB Mouse Client Driver
  devices.usbif.08025002.diag
  devices.usbif.08025002.rte
  devices.usbif.080400.diag  6.1.0.0  COMMITTED  USB Diskette Diagnostics
  devices.usbif.080400.rte   6.1.7.0  COMMITTED  USB Diskette Client Driver
  devices.common.IBM.usb.rte
  devices.usbif.010100.rte   6.1.7.0  COMMITTED  USB Audio Device Driver
  devices.usbif.03000008.rte
  devices.usbif.030101.rte   6.1.7.0  COMMITTED  USB Keyboard Client Driver
  devices.usbif.030102.rte   6.1.7.0  COMMITTED  USB Mouse Client Driver
  …
0
grep "testing" 789.log

zgrep "testing"  123.gz

i like to redirect above production server output to
abc/def/test.txt file which is on some other system test server where i have access

how to do it
grep "testing" 789.log >> abc/def/test.txt
above gives error no such directory as that directory is not there in production server

grep "testing" 789.log
how above different from
grep -C2 "testing" 789.log

i see below time stamp lines came 3 of them when i use -C2
2019-Jan-17 04:50:51.198 EST

i see below time stamp lines came 3 of them when i did not use -C2
2019-Jan-17 04:50:51.198 EST

please advise
WithC2.png
WithoutC2.png
0
when i do ls -ltr i see bunch of .gz files says 123.gz and 456.gz
and bunch of no gz files say 789.log etc

how to grep on say "testing" on both zip gz files and non zip files

grep "testing" 789.log

zgrep "testing"  123.gz

not sure how to combine above two together

also how search today log between 10 am to 11 am for that "testing" word in log?
please advise
0
Hi Expert,

If there anyone working on Oracle Retail V16 SaaS Interface here,
Cloud anyone please guide how to prevent Duplicate file processing to SaaS using PL/SQL or UNIX?

Thank You!
0
Hi,

Need a unix script to loop through thousands of folders and write a file listing the folders that contain less than x amount of subfolders.

Thank you.
0
Dear Experts, I'm testing Oracle 11g on Centos 7 64b.

I installed Oracle but could not connect to the globalDB by sqlplus, it keeps showing error: ORA-12514: TNS:listener does not currently know of service requested in connect even I start the Oracle Database

ora1.PNG
ora2.PNG
I also attached the response file from Installation process. These are the details of listener and tnsname files:

ora3.PNG
lsnrctl status:

ora4.PNG
Can you please help? Many thanks!
db.rsp
0
What's the best way to monitor for UDP syslog traffic coming in from a redhat 4 and redhat 5 syslog clients if it's not arriving at the syslog server. The syslog server is running on a Redhat 6 server. netstat -taulpe | grep syslog is showing that UDP is listening on all IP's on the server but I'd like to see if there is any other way apart from running  tcpdump -i <nic> port 514. Would watch lsof -a -i:514 show it?
0
How to separate out a text file having the following format  on to another text file ?

10.10.10.06  | skjahdkjhhadjhahdahkahdhajkdhajkhjdkhakjhdjkahjdhajkhdjkahjkddddddddddddddddddhakkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkddshajhd
10.10.10.06  |dsjhdjhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
 *ashadjahddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddda
10.10.10.06 | xcnbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxzczc

I would like to have
 
10.10.10.06
-----------------
1) skjahdkjhhadjhahdahkahdhajkdhajkhjdkhakjhdjkahjdhajkhdjkahjkddddddddddddddddddhakkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkddshajhd
2) dsjhdjhjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
 …
0
Hi,

I have a problem  with a server P780 with HMC,  when i launch a save of anything LPAR profile the process go in hanging.

Do you have an idea about what the problem is? On other servers seen from the same console I have no problems
0
Angular Fundamentals
LVL 13
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

I started with asking what the different is between "mode" and "flag", see: https://www.experts-exchange.com/questions/29122213/What-is-the-difference-between-mode-and-flag.html

However, I see that people are using different definitions for a flag. So it's better to start with the question: what is the definition of a flag? I'm not asking for general definitions, or your own definition, but specifically use the definitions in this post (and if necessary correct them and tell me what's wrong about the existing definition).

See: https://techterms.com/definition/flag

In computer science, a flag is a value that acts as a signal for a function or process. The value of the flag is used to determine the next step of a program. Flags are often binary flags, which contain a boolean value (true or false). However, not all flags are binary, meaning they can store a range of values.

Let's start with:

a flag is a value

So apparently, according to this definition, a flag IS a value. So a flag can not be seen as something that be two different values (two different states).

The next sentence confirms that:

Flags are often binary flags, which contain a boolean value (true or false).

Let's say we have c++ std::bitset, but it's about 1 bit. Firstable, it's important to be aware of the difference between:

1. setting the flag
2. setting the bitset

The bitset can be 1 or 0  (in this case because we have one …
0
When it's about "flags", I've noticed that different people have different ideas of what a flag is. Some people start to talk about "bit set" when it's about flags. I think the problem lies with the underlaying definitions. It looks like things are not well defined. So for this question, forget about your own ideas/definitions of what a bit set is, just follow the definitions in this post (and change them if necessary). Also forget about flags, this post is specifically about "bitset". First let's start with some "definitions":

See: http://www.cplusplus.com/reference/bitset/bitset/ (std::bitset)

A bitset stores bits (elements with only two possible values: 0 or 1, true or false, ...).

And see: http://www.cplusplus.com/reference/bitset/bitset/set/ (std::bitset::set)

all bits (1)      
bitset& set();
single bit (2)      
bitset& set (size_t pos, bool val = true);

(1) all bits
Sets (to one) all bits in the bitset.
(2) single bit
Sets val as the value for the bit at position pos.

I understand this. But now first let's start at the beginning and let's define a "bit". Let's define it like this:

A bit is an element of two possible binary values: either 0 or 1.

So let's see a bit as a box that contains a ball or a box that doesn't contain a ball. Now let's take a look at a bitset that represents the number 4:

 -----------------------
|0     | 0     |  1     |
|0*2^0 | 0*2^1 |  1*2^2 |
 -----------------------
3 boxes: 
Box 1: no ball
Box 2: no ball
Box 3: ball

Open in new window

0
In short, I would say:

A flag is a predefined bit or bit sequence that holds a binary value.

A mode is a distinct setting.

So it's not always possible to replace the term "mode" by "flag". This is only possible if it's about a binary value. I got confused by these terms when reading:

http://man7.org/linux/man-pages/man2/open.2.html

The argument flags must include one of the following access modes:
O_RDONLY, O_WRONLY, or O_RDWR.

The file creation flags are O_CLOEXEC,
O_CREAT, O_DIRECTORY, O_EXCL, O_NOCTTY, O_NOFOLLOW, O_TMPFILE, and
O_TRUNC.

The file status flags are all of the remaining flags listed
below.

Why they just don't say:

The file access flags are O_RDONLY, O_WRONLY, and O_RDWR.

Why they suddenly use a different term when it's about "access"? Probably behind the scenes it's also just about a binary value, right? Probably all O_VARIABLE's above are 0 or 1.

And see: https://en.wikipedia.org/wiki/File_descriptor

This table records the mode with which the file (or other resource) has been opened: for reading, writing, appending, and possibly other modes.

So Wikipedia uses the term "mode" only (and not flag). At least they are consistent, because they call them all "modes".

Is there a specific reason why sometimes mode is used and something flag (while it's about the same thing)? I would stay, be at least consistent to avoid confusion.
0
By default, the first three rows of a "file descriptor table" consists of:

FD 0 (standard input,  associated with keyboard)
FD 1 (standard output, associated with screen)
FD 2 (standard error,  associated with screen)

Open in new window


These file descriptors point to one or more rows in the "open file table". Imagine we only have these three file descriptors. Then how does the "open file table" look like?

Usually all three file descriptors point to the same file, but that doesn't mean they point to the same entry in the "open file table". So how the open file table looks like?

_ | offset | reference count | permissions | flags | pointers
_ |    ?   |        ?        |      ?      |   ?
possible more rows

Open in new window


The lsof command shows for example:

lsof        721    root    0u      CHR              136,1       0t0          4 /dev/pts/1
lsof        721    root    1u      CHR              136,1       0t0          4 /dev/pts/1
lsof        721    root    2u      CHR              136,1       0t0          4 /dev/pts/1

Open in new window


The file "/dev/pts/1" is CHR (character special file). They all point to the same file.
I'm also wondering why it's for example "0u" and not "0r"? The file descriptor 0 stands for input, so it only has to read something.

r for read access;
w for write access;
u for read and write access;

Open in new window


I would expect something like: 0r, 1w, 2w instead of 0u, 1u, 2u? And what are the offsets et cetera?
0
On IBM AIX 5L system. I have a Lexmark 2580-100 dot matrix printer, with a D-Link 10/100 Fast Ethernet Parallel Port Print Server (DP-301P+).Whenever the printer goes off, The IBM lpstat command shows the printer in a "DEV_WAIT" status.  I sent it a test print,  lpstat | lp -dprth and nothing.  I looked at lpstat and the printer only had the test in the Queue and was in a wait status.I tried disable/enable commands turning the printer off, the D-Link Off. Nothing using every combination of on/off sequences.  So I added the printer to a nearby PC, and sent a print job via windows to the IP address and it works fine.

Then I restarted the IBM.  The test print was in the queue and still DEV_WAIT.  I deleted it from the queue and went home. The system restarts itself at 4AM.  When I came in the printer was working fine. I think the file /var/spool/lpd/stat/s.prth.lp7 has something to do with it. The printer is lp7  the queue is prth.  There has to be a way to force the IBM to restart the print queue without deleting all pending print jobs.  I know it has something to do with the status file in the var->spool->lpd->stat folder.
0
data no align after i do cat in unix this is my script
cat data*.txt|grep -v ^UNIT_CDE|awk '{print $1,",",$2,",",$3,","$4,",",$5,",",$6,",",$7,",",$8,",",$9,","$10,",",$11,",",$12,",",$13,",",$14,",",$15,","$16,",",$17,",",$18,",",$19,",",$20}' >>  mergetstneg.txt
catfileimg.jpg
0

Unix OS

33K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.