This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To determine the amount of NUSERS, follow these steps: | |
1. Average Connections per Device: | |
- If not using device licensing: 1 | |
- If using device licensing: typically 2 or 3 (maximum 10). | |
2. Average Number of Phantoms: | |
- If using phantoms: provide a specific number. | |
- If not: suggested value is 20. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $(pgrep -c 'GTF') -eq 6 ]; then echo 0; else echo 1; fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use MQClient::MQSeries; | |
sub printLog2 { | |
my ($message, $detail) = @_; | |
print "$message: $detail\n"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for dir in /path/to/directory/*; do [ -d "$dir" ] && echo "Folder: $dir" && echo "Size: $(du -sh "$dir" | awk '{print $1}')"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Converting a Key Database (KDB) to a Java KeyStore (JKS) involves several steps. Here's a simple and effective way to perform the conversion using OpenSSL and keytool. This method assumes that you have the necessary tools installed on your system: | |
1. **Export the Certificate and Key from KDB:** | |
Use `gsk8capicmd_64` to export the certificate and private key from the KDB file to PEM format. | |
2. **Convert the PEM files to a PKCS12 file:** | |
Use OpenSSL to combine the certificate and private key into a PKCS12 file. | |
3. **Import the PKCS12 file into a JKS:** | |
Use the `keytool` command to import the PKCS12 file into a Java KeyStore (JKS). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine_or_job=$(echo "$machine_or_job" | tr '[:upper:]' '[:lower:]' | xargs) | |
if [[ ! "$machine_or_job" =~ ^(machine|job)$ ]]; then | |
echo "Variable does not represent a machine or job" | |
else | |
echo "Variable represents a machine or a job" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBROUTINE ZX.DATA.PROCESSOR | |
* Main routine to process data across multiple zones using PHANTOMs | |
COMMON /PHANTOM.INFO/ PHANTOM.PIDs | |
* Initialize variables | |
ZONES = 'ALPHA':@AM:'BETA':@AM:'GAMMA':@AM:'DELTA':@AM:'EPSILON' | |
NUM.ZONES = DCOUNT(ZONES, @AM) | |
PHANTOM.PIDs = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if correct number of arguments are provided | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 <job_name> <desired_state>" | |
exit 1 | |
fi | |
# Assign command line arguments to variables | |
job_name=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ((i = 0; i < ${#UD_COUNTERPARTY_LIST[@]}; i += 20)); do | |
cd "$UDTHOME/BARCAP.UD" | |
counterparties_batch="${counterparty_list[@]:i:20}" | |
Execute "DELETE CPTY $counterparties_batch" || true | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
while (!stop_requested) { | |
if (access(STOP_FILE, F_OK) != -1) { | |
// Stop file exists | |
printf("Stop file found at %s. Deleting the file and stopping the script.\n", STOP_FILE); | |
// Delete the stop file | |
if (remove(STOP_FILE) == 0) { | |
printf("Stop file deleted successfully.\n"); |