<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>CodeProject Latest postings for Linux Programming</title>
    <link>https://www.codeproject.com</link>
    <description>Latest postings for Linux Programming from CodeProject</description>
    <language>en-us</language>
    <image>
      <title>CodeProject Latest postings for Linux Programming</title>
      <url>https://www.codeproject.com/App_Themes/Std/Img/logo100x30.gif</url>
      <link>https://www.codeproject.com</link>
      <width>100</width>
      <height>30</height>
      <description>CodeProject</description>
    </image>
    <copyright>Copyright  CodeProject, 1999-2024</copyright>
    <webMaster>Webmaster@codeproject.com (Webmaster)</webMaster>
    <lastBuildDate>Mon, 10 Jun 2024 21:06:00 GMT</lastBuildDate>
    <ttl>20</ttl>
    <generator>C# Hand-coded goodness</generator>
    <item>
      <title>DAOS Command Fails with "Transport layer mercury error" on CentOS 7.9</title>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
I'm encountering an issue when running the daos cont create command on my DAOS setup. The command fails with a "Transport layer mercury error." Below are the details of the error and my setup:&lt;br /&gt;
&lt;br /&gt;
Command and Error Message:&lt;br /&gt;
&lt;br /&gt;
[root@client2 ~]# daos cont create tank --label mycont&lt;br /&gt;
external ERR # [5323.920594] mercury-&amp;gt;msg: [error] /builddir/build/BUILD/mercury-2.1.0rc4/src/na/na_ofi.c:3047&lt;br /&gt;
# na_ofi_msg_send(): fi_tsend() failed, rc: -2 (No such file or directory)&lt;br /&gt;
external ERR # [5323.921055] mercury-&amp;gt;hg: [error] /builddir/build/BUILD/mercury-2.1.0rc4/src/mercury_core.c:2727&lt;br /&gt;
# hg_core_forward_na(): Could not post send for input buffer (NA_NOENTRY)&lt;br /&gt;
hg ERR src/cart/crt_hg.c:1104 crt_hg_req_send_cb(0x2a5c8c0) [opc=0x1020004 (DAOS) rpcid=0x18ea69b600000000 rank:tag=0&lt;img src="https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_redface.gif" align="top" alt="Blush | :O" /&gt; ] RPC failed; rc: DER_HG(-1020): 'Transport layer mercury error'&lt;br /&gt;
mgmt ERR src/mgmt/cli_mgmt.c:882 dc_mgmt_pool_find() tank: failed to get PS replicas from 1 servers, DER_HG(-1020): 'Transport layer mercury error'&lt;br /&gt;
pool ERR src/pool/cli.c:198 dc_pool_choose_svc_rank() 00000000:tank: dc_mgmt_pool_find() failed, DER_HG(-1020): 'Transport layer mercury error'&lt;br /&gt;
pool ERR src/pool/cli.c:503 dc_pool_connect_internal() 00000000:tank: cannot find pool service: DER_HG(-1020): 'Transport layer mercury error'&lt;br /&gt;
ERROR: daos: DER_HG(-1020): Transport layer mercury error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Environment Details:&lt;br /&gt;
&lt;br /&gt;
DAOS Version: daos-2.0.3-5.el7.x86_64&lt;br /&gt;
DAOS Client Version: daos-client-2.0.3-5.el7.x86_64&lt;br /&gt;
Libfabric Version: libfabric-1.15.1-1.el7.x86_64&lt;br /&gt;
Mercury Version: mercury-2.1.0~rc4-9.el7.x86_64&lt;br /&gt;
CentOS Version: CentOS 7.9&lt;br /&gt;
Fabric Interface: enp0s3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional Information:&lt;br /&gt;
&lt;br /&gt;
[root@server ~]# ip addr&lt;br /&gt;
1: lo: &amp;lt;loopback,up,lower_up&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000&lt;br /&gt;
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00&lt;br /&gt;
inet 127.0.0.1/8 scope host lo&lt;br /&gt;
valid_lft forever preferred_lft forever&lt;br /&gt;
inet6 ::1/128 scope host&lt;br /&gt;
valid_lft forever preferred_lft forever&lt;br /&gt;
2: enp0s3: &amp;lt;broadcast,multicast,up,lower_up&amp;gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000&lt;br /&gt;
link/ether 08:00:27:bd:95:c2 brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
inet 10.0.2.15/24 brd 10.0.2.255 scope global noprefixroute dynamic enp0s3&lt;br /&gt;
valid_lft 564sec preferred_lft 564sec&lt;br /&gt;
inet6 fe80::e25:a2fd:9904:a8ac/64 scope link noprefixroute&lt;br /&gt;
valid_lft forever preferred_lft forever&lt;br /&gt;
3: enp0s8: &amp;lt;broadcast,multicast,up,lower_up&amp;gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000&lt;br /&gt;
link/ether 08:00:27:bb:cb:4d brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
inet 192.168.56.104/24 brd 192.168.56.255 scope global noprefixroute dynamic enp0s8&lt;br /&gt;
valid_lft 370sec preferred_lft 370sec&lt;br /&gt;
inet6 fe80::8d85:5b39:5f73:6e0b/64 scope link noprefixroute&lt;br /&gt;
valid_lft forever preferred_lft forever&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have also mentioned the DAOS server, client, and agent configuration files for reference.&lt;br /&gt;
&lt;br /&gt;
DAOS Server&lt;br /&gt;
## default: daos_server&lt;br /&gt;
name: daos_server&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
## Access points&lt;br /&gt;
## Immutable after running "dmg storage format".&lt;br /&gt;
#&lt;br /&gt;
## To operate, DAOS will need a quorum of access point nodes to be available.&lt;br /&gt;
## Must have the same value for all agents and servers in a system.&lt;br /&gt;
## Hosts can be specified with or without port. The default port that is set&lt;br /&gt;
## up in port: will be used if a port is not specified here.&lt;br /&gt;
#&lt;br /&gt;
## default: hostname of this node&lt;br /&gt;
access_points: ['10.0.2.15']&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
## Default control plane port&lt;br /&gt;
#&lt;br /&gt;
## Port number to bind daos_server to. This will also be used when connecting&lt;br /&gt;
## to access points, unless a port is specified in access_points:&lt;br /&gt;
#&lt;br /&gt;
## default: 10001&lt;br /&gt;
port: 10001&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
## Transport credentials specifying certificates to secure communications&lt;br /&gt;
#&lt;br /&gt;
transport_config:&lt;br /&gt;
# # In order to disable transport security, uncomment and set allow_insecure&lt;br /&gt;
# # to true. Not recommended for production configurations.&lt;br /&gt;
allow_insecure: true&lt;br /&gt;
#&lt;br /&gt;
# # Location where daos_server will look for Client certificates&lt;br /&gt;
client_cert_dir: /etc/daos/certs/clients&lt;br /&gt;
# # Custom CA Root certificate for generated certs&lt;br /&gt;
ca_cert: /etc/daos/certs/daosCA.crt&lt;br /&gt;
# # Server certificate for use in TLS handshakes&lt;br /&gt;
cert: /etc/daos/certs/server.crt&lt;br /&gt;
# # Key portion of Server Certificate&lt;br /&gt;
key: /etc/daos/certs/server.key&lt;br /&gt;
provider: ofi+sockets&lt;br /&gt;
socket_dir: /var/run/daos_server&lt;br /&gt;
nr_hugepages: 4096&lt;br /&gt;
control_log_mask: DEBUG&lt;br /&gt;
control_log_file: /tmp/daos_server.log&lt;br /&gt;
helper_log_file: /tmp/daos_admin.log&lt;br /&gt;
engines:&lt;br /&gt;
-&lt;br /&gt;
targets: 8&lt;br /&gt;
nr_xs_helpers: 0&lt;br /&gt;
fabric_iface: enp0s3&lt;br /&gt;
fabric_iface_port: 31316&lt;br /&gt;
log_mask: INFO&lt;br /&gt;
log_file: /tmp/daos_engine_0.log&lt;br /&gt;
env_vars:&lt;br /&gt;
- CRT_TIMEOUT=30&lt;br /&gt;
&lt;br /&gt;
scm_mount: /mnt/daos0&lt;br /&gt;
scm_class: ram&lt;br /&gt;
scm_size: 8&lt;br /&gt;
&lt;br /&gt;
DAOS Control file&lt;br /&gt;
&lt;br /&gt;
# default: daos_server&lt;br /&gt;
name: daos_server&lt;br /&gt;
&lt;br /&gt;
# Default destination port to use when connecting to hosts in the hostlist.&lt;br /&gt;
# default: 10001&lt;br /&gt;
port: 10001&lt;br /&gt;
&lt;br /&gt;
# Hostlist, a comma separated list of addresses (hostnames or IPv4 addresses).&lt;br /&gt;
# default: ['localhost']&lt;br /&gt;
hostlist: ['10.0.2.15']&lt;br /&gt;
&lt;br /&gt;
## Transport Credentials Specifying certificates to secure communications&lt;br /&gt;
&lt;br /&gt;
transport_config:&lt;br /&gt;
# # In order to disable transport security, uncomment and set allow_insecure&lt;br /&gt;
# # to true. Not recommended for production configurations.&lt;br /&gt;
allow_insecure: true&lt;br /&gt;
#&lt;br /&gt;
# # Custom CA Root certificate for generated certs&lt;br /&gt;
ca_cert: /etc/daos/certs/daosCA.crt&lt;br /&gt;
# # Admin certificate for use in TLS handshakes&lt;br /&gt;
cert: /etc/daos/certs/admin.crt&lt;br /&gt;
# # Key portion of Admin Certificate&lt;br /&gt;
key: /etc/daos/certs/admin.key&lt;br /&gt;
&lt;br /&gt;
DAOS Agent file&lt;br /&gt;
# default: daos_server&lt;br /&gt;
name: daos_server&lt;br /&gt;
&lt;br /&gt;
# Management server access points&lt;br /&gt;
# Must have the same value for all agents and servers in a system.&lt;br /&gt;
# default: hostname of this node&lt;br /&gt;
access_points: ['10.0.2.15']&lt;br /&gt;
&lt;br /&gt;
# Force different port number to connect to access points.&lt;br /&gt;
# default: 10001&lt;br /&gt;
port: 10001&lt;br /&gt;
&lt;br /&gt;
## Transport Credentials Specifying certificates to secure communications&lt;br /&gt;
#&lt;br /&gt;
transport_config:&lt;br /&gt;
# # In order to disable transport security, uncomment and set allow_insecure&lt;br /&gt;
# # to true. Not recommended for production configurations.&lt;br /&gt;
allow_insecure: true&lt;br /&gt;
#&lt;br /&gt;
# # Custom CA Root certificate for generated certs&lt;br /&gt;
ca_cert: /etc/daos/certs/daosCA.crt&lt;br /&gt;
# # Agent certificate for use in TLS handshakes&lt;br /&gt;
cert: /etc/daos/certs/agent.crt&lt;br /&gt;
# # Key portion of Agent Certificate&lt;br /&gt;
key: /etc/daos/certs/agent.key&lt;br /&gt;
# Use the given directory for creating unix domain sockets&lt;br /&gt;
#&lt;br /&gt;
# NOTE: Do not change this when running under systemd control. If it needs to&lt;br /&gt;
# be changed, then make sure that it matches the RuntimeDirectory setting&lt;br /&gt;
# in /usr/lib/systemd/system/daos_agent.service&lt;br /&gt;
#&lt;br /&gt;
# default: /var/run/daos_agent&lt;br /&gt;
#runtime_dir: /var/run/daos_agent&lt;br /&gt;
&lt;br /&gt;
# Full path and name of the DAOS agent logfile.&lt;br /&gt;
# default: /tmp/daos_agent.log&lt;br /&gt;
log_file: /tmp/daos_agent.log&lt;br /&gt;
&lt;br /&gt;
# Manually define the fabric interfaces and domains to be used by the agent,&lt;br /&gt;
# organized by NUMA node.&lt;br /&gt;
# If not defined, the agent will automatically detect all fabric interfaces and&lt;br /&gt;
# select appropriate ones based on the server preferences.&lt;br /&gt;
#&lt;br /&gt;
#fabric_ifaces:&lt;br /&gt;
#-&lt;br /&gt;
# numa_node: 0&lt;br /&gt;
# devices:&lt;br /&gt;
# -&lt;br /&gt;
# iface: ib0&lt;br /&gt;
# domain: mlx5_0&lt;br /&gt;
# -&lt;br /&gt;
# iface: ib1&lt;br /&gt;
# domain: mlx5_1&lt;br /&gt;
#-&lt;br /&gt;
# numa_node: 1&lt;br /&gt;
# devices:&lt;br /&gt;
# -&lt;br /&gt;
# iface: ib2&lt;br /&gt;
# domain: mlx5_2&lt;br /&gt;
# -&lt;br /&gt;
# iface: ib3&lt;br /&gt;
# domain: mlx5_3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any assistance or insights into resolving this issue would be greatly appreciated. Thank you!</description>
      <author>northernlights from Bombay</author>
      <link>https://www.codeproject.com/Messages/6005053/DAOS-Command-Fails-with-Transport-layer-mercury-er</link>
      <pubDate>Mon, 10 Jun 2024 21:06:00 GMT</pubDate>
      <guid>3_6005053</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>rfcomm ?</title>
      <description>I am looking for help to implement / test rfcomm - on  Ubuntu Description:	Ubuntu 22.04.4 LTS&lt;br /&gt;
&lt;br /&gt;
When I type &lt;br /&gt;
rfcomm -a &lt;br /&gt;
&lt;br /&gt;
I get this response &lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain897628'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode897628' class='copy-code' data-index='897628' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre897628' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
nov25-1@nov251-desktop:~$ rfcomm --a
nov25-1@nov251-desktop:~$ &lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain216167'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode216167' class='copy-code' data-index='216167' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre216167' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
When I type &lt;/pre&gt;&lt;br /&gt;
rfcomm -h &lt;br /&gt;
I  get this &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain357911'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode357911' class='copy-code' data-index='357911' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre357911' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
nov25-1@nov251-desktop:~$ rfcomm --h
RFCOMM configuration utility ver &lt;span class="code-digit"&gt;5&lt;/span&gt;.&lt;span class="code-digit"&gt;64&lt;/span&gt;
Usage:
	rfcomm [options] &amp;lt;command&amp;gt; &amp;lt;dev&amp;gt;

Options:
	-i, --device [hciX|bdaddr]     Local HCI device or BD Address
	-h, --help                     Display help
	-r, --raw                      Switch TTY &lt;span class="code-sdkkeyword"&gt;into&lt;/span&gt; raw mode
	-A, --auth                     Enable authentication
	-E, --encrypt                  Enable encryption
	-S, --secure                   Secure connection
	-C, --central                  Become the central of a piconet
	-L, --linger [seconds]         Set linger timeout
	-a                             Show all devices (&lt;span class="code-keyword"&gt;default&lt;/span&gt;)

Commands:
	bind     &amp;lt;dev&amp;gt; &amp;lt;bdaddr&amp;gt; [channel]	Bind device
	release  &amp;lt;dev&amp;gt;                   	Release device
	show     &amp;lt;dev&amp;gt;                   	Show device
	connect  &amp;lt;dev&amp;gt; &amp;lt;bdaddr&amp;gt; [channel]	Connect device
	listen   &amp;lt;dev&amp;gt; [channel [cmd]]   	Listen
	watch    &amp;lt;dev&amp;gt; [channel [cmd]]   	Watch

nov25-1@nov251-desktop:~$ &lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I am using this link &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://manpages.ubuntu.com/manpages/jammy/man1/rfcomm.1.html"&gt;Ubuntu Manpage:       rfcomm - RFCOMM configuration utility&lt;/a&gt;[&lt;a href="https://manpages.ubuntu.com/manpages/jammy/man1/rfcomm.1.html" target="_blank" title="New Window"&gt;^&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
Any help would be greatly appreciated &lt;br /&gt;
Thanks</description>
      <author>Salvatore Terress</author>
      <link>https://www.codeproject.com/Messages/6002115/rfcomm</link>
      <pubDate>Tue, 21 May 2024 19:37:00 GMT</pubDate>
      <guid>3_6002115</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>How to redirect command output - general reference wanted...</title>
      <description>&lt;div class='pre-lang' id='premain486096'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode486096' class='copy-code' data-index='486096' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre486096' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
&amp;lt;a href="https://man7.org/linux/man-pages/man3/system.3.html"&amp;gt;system(3) - Linux manual page&amp;lt;/a&amp;gt;[&amp;lt;a href="https://man7.org/linux/man-pages/man3/system.3.html" target="_blank" title="New Window"&amp;gt;^&amp;lt;/a&amp;gt;]&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This is somewhat a dupe, so if it bothers you...( I am not allowed to give instructions ...) &lt;br /&gt;
&lt;br /&gt;
I am asking for generic / general help in capturing  Linux command  output.&lt;br /&gt;
&lt;br /&gt;
I am going to use this as an example: &lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain123163'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode123163' class='copy-code' data-index='123163' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre123163' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
system(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;hcitool dev | cut -sf3 "&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I know  what is does - that is NOT of my concern..&lt;br /&gt;
&lt;br /&gt;
I can see the result in (Qt) console...&lt;br /&gt;
&lt;br /&gt;
I do not know HOW - what "hidden" code (std??) put &lt;br /&gt;
the actual result of the call onto console &lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
how can I  redirect such call for my  purpose ?&lt;br /&gt;
&lt;br /&gt;
I did RTFM for "system" and found  NO references , or missed them, &lt;br /&gt;
on how to capture THE actual output of the command. &lt;br /&gt;
&lt;br /&gt;
that said - what would be SUCCESSFUL phrase to ask Mrs Google to &lt;br /&gt;
give me a general Linux resource ( text book ?) to cover &lt;br /&gt;
&lt;br /&gt;
"standard output / input / error "&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
how to figure out if the command uses &lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain268400'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode268400' class='copy-code' data-index='268400' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre268400' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;standard output / input / error "&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
and how to access it in C/C++&lt;br /&gt;
&lt;br /&gt;
..all this just for learning purpose &lt;br /&gt;
&lt;br /&gt;
CHEERS &lt;br /&gt;
THANks</description>
      <author>Salvatore Terress</author>
      <link>https://www.codeproject.com/Messages/5990921/How-to-redirect-command-output-general-reference-w</link>
      <pubDate>Mon, 04 Mar 2024 20:15:00 GMT</pubDate>
      <guid>3_5990921</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>Bluetooth - dead end again...</title>
      <description>I have reached another dead end in my Bluetooth programming...&lt;br /&gt;
without getting into details - task works fine when performed in Linux terminal&lt;br /&gt;
&lt;br /&gt;
, but fails to connect when run in C++ code. &lt;br /&gt;
&lt;br /&gt;
After RTFM I found &lt;br /&gt;
"the error source" in "bluez " library, burred in few layers of undocumented code ... &lt;br /&gt;
&lt;br /&gt;
So I am going back to "level" where I can control the&lt;br /&gt;
 usage of "bluez" library...&lt;br /&gt;
&lt;br /&gt;
That means to go back to &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://people.csail.mit.edu/albert/bluez-intro/c404.html"&gt;https://people.csail.mit.edu/albert/bluez-intro/c404.html&lt;/a&gt;[&lt;a href="https://people.csail.mit.edu/albert/bluez-intro/c404.html" target="_blank" title="New Window"&gt;^&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My question &lt;br /&gt;
to the forum - &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;is there a C++ version of the above?&lt;/b&gt; &lt;br /&gt;
( I asked Mrs Google...) &lt;br /&gt;
&lt;br /&gt;
Yes, the foundation would still be "bluez" library...but if I can &lt;br /&gt;
manage to convert the above to C++ it my be "some " progress.&lt;br /&gt;
&lt;br /&gt;
Thanks very much for any constructive help.</description>
      <author>Salvatore Terress</author>
      <link>https://www.codeproject.com/Messages/5989327/Bluetooth-dead-end-again</link>
      <pubDate>Fri, 23 Feb 2024 01:26:00 GMT</pubDate>
      <guid>3_5989327</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>3dDeconvolve coding</title>
      <description>I have done the individual analysis on my data , now I m trying to run 3dDeconvolve code but it does not work at all. I dont know what is wrong.</description>
      <author>Sevinc Bayar</author>
      <link>https://www.codeproject.com/Messages/5983196/3dDeconvolve-coding</link>
      <pubDate>Thu, 18 Jan 2024 18:31:00 GMT</pubDate>
      <guid>3_5983196</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>hcitool numbering hcix</title>
      <description>I am using hcitool to identify  local , attached to my PC via USB&lt;br /&gt;
 Bluetooth adapters. &lt;br /&gt;
&lt;br /&gt;
The actual  command is "hcitool dev". &lt;br /&gt;
Most of the time I receive hci0 plus address. &lt;br /&gt;
Recently I started getting  hci1.&lt;br /&gt;
&lt;br /&gt;
If I attach two adapters &lt;br /&gt;
I receive &lt;br /&gt;
hci0&lt;br /&gt;
hcix &lt;br /&gt;
&lt;br /&gt;
where hcix keeps increasing ( the x ) with each, same , hcitool dev command. &lt;br /&gt;
&lt;br /&gt;
I am looking for way to keep the hci0 as hci0. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks very much for your help, it is appreciated very much</description>
      <author>Salvatore Terress</author>
      <link>https://www.codeproject.com/Messages/5978471/hcitool-numbering-hcix</link>
      <pubDate>Tue, 19 Dec 2023 00:15:00 GMT</pubDate>
      <guid>3_5978471</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>how to use "whereis" recursively ?</title>
      <description>Simple , but Mrs Google gives " where space is "....and not "whereis"....</description>
      <author>Salvatore Terress</author>
      <link>https://www.codeproject.com/Messages/5975257/how-to-use-whereis-recursively</link>
      <pubDate>Tue, 28 Nov 2023 20:17:00 GMT</pubDate>
      <guid>3_5975257</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>Academic question - what is basic Bluetooth Linux access ?</title>
      <description>This is NOT problem / does not requires code / details and answer. &lt;br /&gt;
&lt;br /&gt;
Basic statement &lt;br /&gt;
"bluez" (library) is part of the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Academic question:&lt;br /&gt;
what is the basic / fundamental access of Bluetooth to Linux kernel ?&lt;br /&gt;
Is bypassing "bluez / hci " the way ?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
"bluez" library uses "hci" "commands" , other GUI applications / commands are "free to utilize bluez" ....&lt;br /&gt;
&lt;br /&gt;
For example - Qt uses "bluez" but have no means to actually reset Bluetooth devices - it will access devices no longer near system....&lt;br /&gt;
so do other application(s) .</description>
      <author>Salvatore Terress</author>
      <link>https://www.codeproject.com/Messages/5971674/Academic-question-what-is-basic-Bluetooth-Linux-ac</link>
      <pubDate>Tue, 07 Nov 2023 14:48:00 GMT</pubDate>
      <guid>3_5971674</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>How to verify Bluetooth?</title>
      <description>I have "upgraded" to Ubuntu 23.04.&lt;br /&gt;
"Discovered"it is lacking Bluetooth.&lt;br /&gt;
Used this opportunity to test "verify Bluetooth " in my code using "bluetoothctl".&lt;br /&gt;
The command responds correctly , but "gets stuck " &lt;br /&gt;
in "Waiting to connect to bluetoothd...".&lt;br /&gt;
&lt;br /&gt;
Used same command in "terminal" with same result.&lt;br /&gt;
&lt;br /&gt;
Can somebody suggest similar command or "bluetoothctl"command option (timeout ?)so it does detect lack of Bluetooth, but does not get stuck.&lt;br /&gt;
&lt;br /&gt;
Temporary , I do verify Bluetooth not working by looking for "Agent registered " failure - which is correct response when Bluetooth is OK, actually running. Then if it runs  I can "exit" from command. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Help is much appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain49384'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode49384' class='copy-code' data-index='49384' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre49384' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
nov25-1@nov251-desktop:~$ bluetoothctl 
Waiting to connect to bluetoothd...&lt;/pre&gt;</description>
      <author>Salvatore Terress</author>
      <link>https://www.codeproject.com/Messages/5970916/How-to-verify-Bluetooth</link>
      <pubDate>Fri, 03 Nov 2023 01:15:00 GMT</pubDate>
      <guid>3_5970916</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>Message Closed</title>
      <description>Message Closed&lt;br /&gt;
&lt;br /&gt;
&lt;small&gt;&lt;i&gt;Kidding, I just wanted in on the fun.&lt;/i&gt;&lt;/small&gt;&lt;br /&gt;

&lt;div class="signature"&gt;Jeremy&amp;nbsp;Falcon&lt;/div&gt;</description>
      <author>Jeremy Falcon</author>
      <link>https://www.codeproject.com/Messages/5967211/Message-Closed</link>
      <pubDate>Fri, 13 Oct 2023 17:59:00 GMT</pubDate>
      <guid>3_5967211</guid>
      <subject>Linux Programming</subject>
    </item>
    <item>
      <title>Shrinking root partiton</title>
      <description>On my home Linux box  I want to shrink my root 1.8 TB partition (&lt;code&gt;ext4&lt;/code&gt;). Even unmounted gparted says "1.8 TB minimum size". And the GUI, accordingly, refuses to shrink it. &lt;br /&gt;
&lt;br /&gt;
Googling til the end of elephanting times led me to &lt;code&gt;resize2f2&lt;/code&gt; how dangerous is that, in your experience? &lt;br /&gt;
And just trying to wrap my head around it is there "one filesystem size and one partition size?"&lt;br /&gt;
&lt;br /&gt;
I actually  want to reinstall the OS, and have poor experiences of upgrading. I have 0.6 TB of data, that I want to copy to a non-boot partition. and do not fancy the idea of buying storage to be used for an hour or two only. So yes I admit I am cheap and lazy, and I will never ever install Linux with such monolithic partitioning.&lt;br /&gt;
Thanks : )&lt;br /&gt;
&lt;div class="signature"&gt;&lt;i&gt;"If we don't change direction, we'll end up where we're going"&lt;/i&gt;&lt;/div&gt;</description>
      <author>megaadam</author>
      <link>https://www.codeproject.com/Messages/5922498/Shrinking-root-partiton</link>
      <pubDate>Tue, 24 Jan 2023 11:27:00 GMT</pubDate>
      <guid>3_5922498</guid>
      <subject>Linux Programming</subject>
    </item>
  </channel>
</rss>