Open-source News

Aspeed ACRY Engine Driver On Deck For Linux 6.3 To Speed-Up ECDSA/RSA

Phoronix - Mon, 01/16/2023 - 19:31
The Aspeed ACRY engine found with new AST2600 baseboard management controllers (BMCs) for accelerating ECDSA/RSA signature and verification tasks is set to see an upstream driver with the Linux 6.3 cycle...

Ethernet Driver Support For NVIDIA's BlueField-3 DPU Coming To Linux 6.3

Phoronix - Mon, 01/16/2023 - 19:15
NVIDIA engineers are working on upstreaming support for the new BlueField-3 DPU into the Linux kernel. This DPU rated for 400 Gb/s networking will see Ethernet driver support come Linux 6.3...

Recover from an unsuccessful git rebase with the git reflog command

opensource.com - Mon, 01/16/2023 - 16:00
Recover from an unsuccessful git rebase with the git reflog command agantony Mon, 01/16/2023 - 03:00

The git rebase command allows you to adjust the history of your Git repository. It's a useful feature, but of course, mistakes can be made. As is usually the case with Git, you can repair your error and restore your repository to a former state. To recover from an unsuccessful rebase, use the git reflog command.

Git reflog

Suppose you perform this interactive rebase:

$ git rebase -i HEAD~20

In this context, ~20 means to rebase the last 20 commits.

Unfortunately, in this imaginary scenario, you mistakenly squashed or dropped some commits you didn't want to lose. You've already completed the rebase, but this is Git, so of course, you can recover your lost commits.

Review your history with reflog

 Run the git reflog command to collect data and view a history of your interactions with your repository. This is an example for my demonstration repository, however, the result will vary depending on your actual repository:

$ git reflog 222967b (HEAD -> main) HEAD@{0}: rebase (finish): returning to refs/heads/main 222967b (HEAD -> main) HEAD@{1}: rebase (squash): My big rebase c388f0c HEAD@{2}: rebase (squash): # This is a combination of 20 commits 56ee04d HEAD@{3}: rebase (start): checkout HEAD~20 0a0f875 HEAD@{4}: commit: An old good commit [...]Find the last good commit

In this example, HEAD@{3} represents the start of your rebase. You can tell because its description is rebase (start).

The commit just under it, 0a0f875 HEAD@{4}, is the tip of your Git branch before you executed your incorrect rebase. Depending on how old and active your repository is, there are likely more lines below this one, but assume this is the commit you want to restore.

More on Git What is Git? Git cheat sheet Markdown cheat sheet New Git articles Restore the commit

To recover the commit you accidentally squashed and all of its parent commits, including those accidentally squashed or dropped, use git checkout. In this example, HEAD@{4} is the commit you need to restore, so that's the one to check out:

$ git checkout HEAD@{4}

With your good commit restored, you can create a new branch using git checkout -b as usual. Replace with your desired branch name, such as test-branch.

Git version control

Git's purpose is to track versions, and its default setting is usually to preserve as much data about your work as feasible. Learning to use new Git commands makes many of its most powerful features available and safeguards your work.

The git rebase command allows you to adjust the history of your Git repository. It's a useful feature, but of course, mistakes can be made. Use the git reflog command to recover.

Image by:

kris krüg

Git What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

How to use the open source MQTT plug-in in JMeter

opensource.com - Mon, 01/16/2023 - 16:00
How to use the open source MQTT plug-in in JMeter chongyuanyin Mon, 01/16/2023 - 03:00

In a previous article, I described how JMeter has built-in support for HTTP, HTTPS, TCP, and other common protocols and has a plug-in extension mechanism.

Through plug-ins, you can support much more than just what's built-in, including MQTT.

MQTT is a mainstream protocol in the IoT world. Although it is not a protocol type that comes with JMeter, it is extremely common in IoT testing scenarios. In order to support the load testing of the MQTT protocol, EMQ developed a JMeter-based open source testing plug-in for the MQTT protocol.

This article introduces how to use the MQTT plug-in in JMeter.

Install the MQTT plug-in on JMeter

The installation of the MQTT plug-in is similar to other JMeter third-party plug-ins:

  1. Download the latest version of the plug-in mqtt-xmeter-2.0.2-jar-with-dependencies.jar from GitHub. The plug-in supports JMeter 3.2 and above.
  2. Copy the plug-in jar package to the plug-in directory of JMeter: $JMETER_HOME/lib/ext.
  3. Restart JMeter.

At the time of writing, the JMeter MQTT plug-in supports a variety of samplers, such as connection, message publish, and message subscription.

These can be combined to build more complex test scenarios.

MQTT connect sampler

The Connect Sampler simulates an IoT device and initiates an MQTT connection.

Image by:

(Chongyuan Yin, CC BY-SA 4.0)

Server name or IP: The address of the MQTT server being tested.

Port number: Taking the EMQX Broker as an example, the default ports are 1883 for TCP connections and 8883 for SSL connections. Please refer to the specific configuration of the server for the specific port.

MQTT version: Presently supports MQTT 3.1 and 3.1.1 versions.

Timeout: Connection timeout setting, in seconds.

Protocols: Supports TCP, SSL, WS, and WSS connections to MQTT servers. When selecting an SSL or WSS encrypted channel connection, a one-way or two-way authentication (Dual) can be selected. If two-way authentication is required, specify the appropriate client certificate (p12 certificate) and the corresponding file protection password (Secret).

User authentication: If the MQTT server is configured for user authentication, provide the corresponding Username and Password.

ClientId: The identity of the virtual user. If Add random suffix for ClientId is enabled, a UUID string is added as a suffix to each ClientId and the whole virtual user identifier.

Keep alive: The interval for sending heartbeat signals. For example, 300 means that the client sends ping requests to the server every 300 seconds to keep the connection active.

Connect attempt max: The maximum number of reconnection attempts during the first connection. If this number is exceeded, the connection is considered failed. If the user wants to keep trying to reconnect, set this to -1.

Reconnect attempt max: The maximum number of reconnect attempts during subsequent connections. If this number is exceeded, the connection is considered failed. If the user wants to keep trying to reconnect, set this to -1.

Clean session: Set this option to false when the user wants to keep the session state between connections or true when the user does not want to keep the session state in new connections.

MQTT message publish sampler (MQTT Pub Sampler)

The message publish sampler reuses the MQTT connection established in the Connection Sampler to publish messages to the target MQTT server.

Image by:

(Chongyuan Yin, CC BY-SA 4.0)

QoS Level: Quality of Service, with values 0, 1, and 2, representing AT_MOST_ONCE, AT_LEAST_ONCE, and EXACTLY_ONCE, respectively, in the MQTT protocol specification.

Retained messages: If you want to use retained messages, set this option to true to have the MQTT server store the retained messages published by the plug-in using the given QoS. When the subscription occurs on the corresponding topic, the last retained message is delivered directly to the subscriber. Therefore, the subscriber does not have to wait to get the latest status value of the publisher.

Topic name: The topic of the published message.

Add timestamp in payload: If enabled, the current timestamp is attached to the beginning of the published message body. Together with the Payload includes timestamp option of the message subscription sampler, this can calculate the delay time reached by the message at the message receiving end. If disabled, only the actual message body is sent.

Payloads and Message type: Three message types are presently supported:

  • String: Ordinary string.
  • Hex String: A string is presented as a hexadecimal value, such as Hello, which can be represented as 48656C6C6F (where 48 corresponds to the letter H in the ASCII table, and so on). Typically, hexadecimal strings are used to construct non-textual message bodies, such as describing certain private protocol interactions, control information, and so on.
  • Random string with a fixed length: A random string of a specified length (in bytes) is generated as a message body.
MQTT message subscription sampler (MQTT Sub Sampler)

The Message Pub Sampler reuses the MQTT connection established in the Connection Sampler to subscribe to messages from the target MQTT server.

Image by:

(Chongyuan Yin, CC BY-SA 4.0)

More on edge computing Understanding edge computing Why Linux is critical to edge computing eBook: Running Kubernetes on your Raspberry Pi Download now: The automated enterprise eBook eBook: A practical guide to home automation using open source tools eBook: 7 examples of automation on the edge What is edge machine learning? The latest on edge

QoS Level: Quality of Service, the meaning is the same as that for the Message Pub Sampler.

Topic name: The topic to which the subscribed message belongs. A single message subscription sampler can subscribe to multiple topics, separated by commas.

Payload includes timestamp: If enabled, the timestamp is parsed from the beginning of the message body, which can be used to calculate the receive delay of the message with the Add timestamp in the payload option of the message delivery sampler. If disabled, only the actual message body is parsed.

Sample on: For the sampling method, the default is specified elapsed time (ms), such as sampling every millisecond. The number of received messages can also be selected, such as sampling once for every specified number of messages received.

Debug response: If checked, the message content is printed in the JMeter response. This option is mainly used for debugging purposes. It isn't recommended to run the test formally when checked in order to avoid affecting the test efficiency.

MQTT disconnect sampler (MQTT DisConnect)

Disconnects the MQTT connection established in the connection sampler.

Image by:

(Chongyuan Yin, CC BY-SA 4.0)

For flexibility, the property values in the above sampler can refer to JMeter's system or custom variables.

MQTT and JMeter

In this article, I've introduced the various test components of the JMeter MQTT plug-in. In another article, I'll discuss in detail how to build test scripts with the MQTT plug-in for different test scenarios.

This article originally appeared on How to Use the MQTT Plug-in in JMeter and is republished with permission.

In order to support the load testing of the MQTT protocol, EMQ developed a JMeter-based open source testing plug-in for the MQTT protocol.

Image by:

Opensource.com

Internet of Things (IoT) Edge computing What to read next Build test scripts for your IoT platform This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Scrcpy – Display and Control Your Android Device via Linux Desktop

Tecmint - Mon, 01/16/2023 - 14:19
The post Scrcpy – Display and Control Your Android Device via Linux Desktop first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Brief: This guide shows how to install scrcpy an application that helps you connect, display and control an android device from your Linux desktop computer. Scrcpy (pronounced “screen copy“) is a free, open-source, and

The post Scrcpy – Display and Control Your Android Device via Linux Desktop first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Kodi 20 Released With VA-API AV1 Support, Steam Deck Controls Support

Phoronix - Mon, 01/16/2023 - 08:02
Kodi 20 "Nexus" was released today as the latest major feature release for this widely-used HTPC/PVR software formerly known as XBMC...

Pages