Logic thread between output folders and input transactions

I’m studying the bitcoin protocol and I don’t have very clear things, for example the logical thread that exists between an output transaction and a subsequent input transaction, where that output is direct.

I realized that the input transaction contains the reference to the output transaction through the Outpoint type, but now how could the input transaction related to the output transaction be identified?

an example

Bob sells a coffee to Alice and Alice pays in bitcoins, then bob spends his input transaction coming from the alice output transaction, Now I want to find and the two Rawtransactions where the alice transaction information and the bob information are contained for connect the two RawTransactions. I believe that I haven’t understood any important steps to do this

Sorry for my terrible English but I’m learning

Can’t delete files from external hard drive / Input – Output error

I can’t delete some files from a external hard drive. This the result i get in the terminal when i try to do it:

camilo@camilo-S400CA:~$   sudo rm -r '/media/camilo/TOSHIBA EXT/Descargas' [sudo] password for camilo:  rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Dragon Ball Z Season 1 BrRip FullHD 1080p Spa Latino, Japanese, English + Sub/14. Princess Snake.mkv.part': No such file or directory rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Dragon Ball Z Season 1 BrRip FullHD 1080p Spa Latino, Japanese, English + Sub/38. Nursing Wounds.mkv.part': Input/output error rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 1997 - Paroles Musicales': Input/output error rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 1956 - Violeta Parra, acompañada de guitarra (Folklore de Chile Vol. II)/13 - Tonada del medio.mp3': Is a directory rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 1956 - Violeta Parra, canto y guitarra (Folklore de Chile Vol. I)/17 - La paloma ingrata.mp3': No such file or directory rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 1971 - Canciones Casa de las Americas': Input/output error rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 2003 - Memoria del cantar popular/05 - Que dirá el santo padre.mp3': No such file or directory rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 2004 - Grandes Exitos': No such file or directory rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 2004 - Puras Cuecas/23 - Aromas.mp3': No such file or directory camilo@camilo-S400CA:~$   sudo rm -r '/media/camilo/TOSHIBA EXT/Juegos/Doom' rm: cannot remove '/media/camilo/TOSHIBA EXT/Juegos/Doom/Mods/Doom 64/D64RTR_BRIGHTMAPS.PK3': Input/output error rm: cannot remove '/media/camilo/TOSHIBA EXT/Juegos/Doom/Mods/Doom 64/D64RTR_CHANGELOG.TXT': Input/output error rm: cannot remove '/media/camilo/TOSHIBA EXT/Juegos/Doom/Mods/Doom 64/D64RTR_INSTRUCTIONS.TXT': Input/output error rm: cannot remove '/media/camilo/TOSHIBA EXT/Juegos/Doom/Mods/Doom 64/D64RTR_README.TXT': Input/output error camilo@camilo-S400CA:~$    

Apart from these the drive is working ok.

I tried to run a SMART test to the drive but i was unable to because according to GSmartControl and GnomeDisks the hd does seem to have Smart Control, which is weird because i buyed this thing like two or three months ago.

Thanks in advance!

Low USB headset output quality when recording audio

I dumped the ALSA soundcard output, there was no noticeable drop in quality. after the recording stopped. During recording, audio output is choppy and low volume. This is my pulseaudio debug-level logs:

I: [pulseaudio] client.c: Created 1 "Native client (UNIX socket client)" D: [pulseaudio] protocol-native.c: Protocol version: remote 32, local 32 I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1 D: [pulseaudio] protocol-native.c: SHM possible: yes D: [pulseaudio] protocol-native.c: Negotiated SHM: yes D: [pulseaudio] protocol-native.c: Memfd possible: yes D: [pulseaudio] protocol-native.c: Negotiated SHM type: shared memfd D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472 D: [pulseaudio] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes D: [pulseaudio] protocol-native.c: Enabling srbchannel... D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for pavucontrol D: [pulseaudio] module-augment-properties.c: Found /usr/share/applications/pavucontrol.desktop. D: [pulseaudio] conf-parser.c: Parsing configuration file '/usr/share/applications/pavucontrol.desktop' D: [pulseaudio] protocol-native.c: Client enabled srbchannel. D: [pulseaudio] module-stream-restore.c: Not restoring device for stream source-output-by-application-id:org.PulseAudio.pavucontrol, because already set D: [pulseaudio] module-intended-roles.c: Not setting device for stream Peak detect, because already set. D: [pulseaudio] source-output.c: Negotiated format: pcm, format.sample_format = "\"float32le\""  format.rate = "25"  format.channels = "1"  format.channel_map = "\"mono\"" I: [pulseaudio] source-output.c: Trying to change sample rate D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.usb-1395_PXC_550-00.iec958-stereo becomes busy, resuming. D: [pulseaudio] sink.c: Suspend cause of sink alsa_output.usb-1395_PXC_550-00.iec958-stereo is 0x0000, resuming D: [pulseaudio] reserve-wrap.c: Successfully acquired reservation lock on device 'Audio1' I: [alsa-sink-USB Audio] alsa-sink.c: Trying resume... I: [alsa-sink-USB Audio] alsa-util.c: Cannot disable ALSA period wakeups D: [alsa-sink-USB Audio] alsa-util.c: Maximum hw buffer size is 5461 ms D: [alsa-sink-USB Audio] alsa-util.c: Set buffer size first (to 96000 samples), period size second (to 48000 samples). I: [alsa-sink-USB Audio] alsa-util.c: ALSA period wakeups were not disabled D: [alsa-sink-USB Audio] alsa-sink.c: hwbuf_unused=0 D: [alsa-sink-USB Audio] alsa-sink.c: setting avail_min=95119 I: [alsa-sink-USB Audio] alsa-sink.c: Time scheduling watermark is 18.38ms I: [alsa-sink-USB Audio] alsa-sink.c: Resumed successfully... D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.usb-1395_PXC_550-00.iec958-stereo becomes idle, timeout in 5 seconds. I: [alsa-sink-USB Audio] alsa-sink.c: Starting playback. D: [alsa-sink-USB Audio] ratelimit.c: 702 events suppressed D: [alsa-sink-USB Audio] alsa-sink.c: Cutting sleep time for the initial iterations by half. D: [alsa-sink-USB Audio] alsa-sink.c: Cutting sleep time for the initial iterations by half. D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.usb-1395_PXC_550-00.iec958-stereo becomes idle, timeout in 5 seconds. D: [pulseaudio] resampler.c: Resampler: D: [pulseaudio] resampler.c:   rate 48000 -> 25 (method peaks) D: [pulseaudio] resampler.c:   format s16le -> float32le (intermediate s16le) D: [pulseaudio] resampler.c:   channels 2 -> 1 (resampling 1) D: [pulseaudio] resampler.c: Channel matrix: D: [pulseaudio] resampler.c:        I00   I01  D: [pulseaudio] resampler.c:     +------------ D: [pulseaudio] resampler.c: O00 | 0.500 0.500 I: [pulseaudio] remap.c: Using stereo to mono remapping D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0 D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0 I: [pulseaudio] source-output.c: Created output 0 "Peak detect" on alsa_output.usb-1395_PXC_550-00.iec958-stereo.monitor with sample spec float32le 1ch 25Hz and channel map mono I: [pulseaudio] source-output.c:     media.name = "Peak detect" I: [pulseaudio] source-output.c:     application.name = "PulseAudio Volume Control" I: [pulseaudio] source-output.c:     native-protocol.peer = "UNIX socket client" I: [pulseaudio] source-output.c:     native-protocol.version = "32" I: [pulseaudio] source-output.c:     application.id = "org.PulseAudio.pavucontrol" I: [pulseaudio] source-output.c:     application.icon_name = "audio-card" I: [pulseaudio] source-output.c:     application.version = "3.0" I: [pulseaudio] source-output.c:     application.process.id = "31855" I: [pulseaudio] source-output.c:     application.process.user = "p" I: [pulseaudio] source-output.c:     application.process.host = "desktop" I: [pulseaudio] source-output.c:     application.process.binary = "pavucontrol" I: [pulseaudio] source-output.c:     application.language = "en_US.UTF-8" I: [pulseaudio] source-output.c:     window.x11.display = ":1" I: [pulseaudio] source-output.c:     application.process.machine_id = "6eacec97385842c2a8c31dfb7da6426d" I: [pulseaudio] source-output.c:     application.process.session_id = "1" I: [pulseaudio] source-output.c:     module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol" D: [alsa-sink-USB Audio] alsa-sink.c: Cutting sleep time for the initial iterations by half. D: [alsa-sink-USB Audio] alsa-sink.c: Cutting sleep time for the initial iterations by half. D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=0, base=4, prebuf=1, minreq=0 maxrewind=0 D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=4194304, base=4, prebuf=4, minreq=4 maxrewind=0 I: [pulseaudio] protocol-native.c: Final latency 80.00 ms = 40.00 ms + 40.00 ms D: [alsa-sink-USB Audio] alsa-sink.c: Cutting sleep time for the initial iterations by half. D: [alsa-sink-USB Audio] alsa-sink.c: Latency set to 40.00ms D: [alsa-sink-USB Audio] alsa-sink.c: hwbuf_unused=376320 D: [alsa-sink-USB Audio] alsa-sink.c: setting avail_min=95119 D: [alsa-sink-USB Audio] alsa-sink.c: Requesting rewind due to latency change. D: [alsa-sink-USB Audio] alsa-sink.c: Latency set to 40.00ms D: [alsa-sink-USB Audio] alsa-sink.c: hwbuf_unused=376320 D: [alsa-sink-USB Audio] alsa-sink.c: setting avail_min=95119 D: [alsa-sink-USB Audio] alsa-sink.c: Requested to rewind 384000 bytes. D: [alsa-sink-USB Audio] alsa-sink.c: Limited to 383744 bytes. D: [alsa-sink-USB Audio] alsa-sink.c: before: 95936 D: [alsa-sink-USB Audio] alsa-sink.c: after: 95936 D: [alsa-sink-USB Audio] alsa-sink.c: Rewound 383744 bytes. D: [alsa-sink-USB Audio] sink.c: Processing rewind... D: [alsa-sink-USB Audio] source.c: Processing rewind... D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event. D: [pulseaudio] module-stream-restore.c: Not restoring device for stream source-output-by-application-id:org.PulseAudio.pavucontrol, because already set D: [pulseaudio] module-intended-roles.c: Not setting device for stream Peak detect, because already set. D: [pulseaudio] source-output.c: Negotiated format: pcm, format.sample_format = "\"float32le\""  format.rate = "25"  format.channels = "1"  format.channel_map = "\"mono\"" I: [pulseaudio] source-output.c: Trying to change sample rate D: [pulseaudio] module-suspend-on-idle.c: Source alsa_input.usb-1395_PXC_550-00.analog-mono becomes busy, resuming. D: [pulseaudio] source.c: Suspend cause of source alsa_input.usb-1395_PXC_550-00.analog-mono is 0x0000, resuming I: [alsa-source-USB Audio] alsa-source.c: Trying resume... I: [alsa-source-USB Audio] alsa-util.c: Cannot disable ALSA period wakeups D: [alsa-source-USB Audio] alsa-util.c: Maximum hw buffer size is 32768 ms D: [alsa-source-USB Audio] alsa-util.c: Set buffer size first (to 32000 samples), period size second (to 16000 samples). I: [alsa-source-USB Audio] alsa-util.c: ALSA period wakeups were not disabled D: [alsa-source-USB Audio] alsa-source.c: hwbuf_unused=0 D: [alsa-source-USB Audio] alsa-source.c: setting avail_min=30237 I: [alsa-source-USB Audio] alsa-source.c: Time scheduling watermark is 110.25ms I: [alsa-source-USB Audio] alsa-source.c: Resumed successfully... I: [alsa-source-USB Audio] alsa-source.c: Starting capture. D: [pulseaudio] module-suspend-on-idle.c: Source alsa_input.usb-1395_PXC_550-00.analog-mono becomes idle, timeout in 5 seconds. D: [pulseaudio] module-suspend-on-idle.c: Source alsa_input.usb-1395_PXC_550-00.analog-mono becomes idle, timeout in 5 seconds. D: [pulseaudio] resampler.c: Resampler: D: [pulseaudio] resampler.c:   rate 16000 -> 25 (method peaks) D: [pulseaudio] resampler.c:   format s16le -> float32le (intermediate s16le) D: [pulseaudio] resampler.c:   channels 1 -> 1 (resampling 1) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=2, prebuf=0, minreq=1 maxrewind=0 D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=2, prebuf=0, minreq=2 maxrewind=0 I: [pulseaudio] source-output.c: Created output 1 "Peak detect" on alsa_input.usb-1395_PXC_550-00.analog-mono with sample spec float32le 1ch 25Hz and channel map mono I: [pulseaudio] source-output.c:     media.name = "Peak detect" I: [pulseaudio] source-output.c:     application.name = "PulseAudio Volume Control" I: [pulseaudio] source-output.c:     native-protocol.peer = "UNIX socket client" I: [pulseaudio] source-output.c:     native-protocol.version = "32" I: [pulseaudio] source-output.c:     application.id = "org.PulseAudio.pavucontrol" I: [pulseaudio] source-output.c:     application.icon_name = "audio-card" I: [pulseaudio] source-output.c:     application.version = "3.0" I: [pulseaudio] source-output.c:     application.process.id = "31855" I: [pulseaudio] source-output.c:     application.process.user = "p" I: [pulseaudio] source-output.c:     application.process.host = "desktop" I: [pulseaudio] source-output.c:     application.process.binary = "pavucontrol" I: [pulseaudio] source-output.c:     application.language = "en_US.UTF-8" I: [pulseaudio] source-output.c:     window.x11.display = ":1" I: [pulseaudio] source-output.c:     application.process.machine_id = "6eacec97385842c2a8c31dfb7da6426d" I: [pulseaudio] source-output.c:     application.process.session_id = "1" I: [pulseaudio] source-output.c:     module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol" D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=0, base=4, prebuf=1, minreq=0 maxrewind=0 D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=4194304, base=4, prebuf=4, minreq=4 maxrewind=0 I: [pulseaudio] protocol-native.c: Final latency 80.00 ms = 40.00 ms + 40.00 ms D: [alsa-source-USB Audio] alsa-source.c: latency set to 40.00ms D: [alsa-source-USB Audio] alsa-source.c: hwbuf_unused=62720 D: [alsa-source-USB Audio] alsa-source.c: setting avail_min=161 D: [alsa-source-USB Audio] alsa-source.c: latency set to 40.00ms D: [alsa-source-USB Audio] alsa-source.c: hwbuf_unused=62720 D: [alsa-source-USB Audio] alsa-source.c: setting avail_min=161 D: [alsa-source-USB Audio] alsa-source.c: Requested volume: mono: 65536 / 100% / 0.00 dB D: [alsa-source-USB Audio] alsa-source.c: Got hardware volume: mono: 65536 / 100% / 0.00 dB D: [alsa-source-USB Audio] alsa-source.c: Calculated software volume: mono: 65536 / 100% / 0.00 dB (accurate-enough=yes) D: [alsa-source-USB Audio] source.c: Volume not changing D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event. D: [alsa-sink-USB Audio] alsa-sink.c: Wakeup from ALSA! E: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.  

I can’t tell if anything relevant is happening here. There is no log output from ALSA in any files from /var/log or dmesg.

My best guess is line interference over the USB connection? The headset has no problems over bluetooth.

is it possible to trim the table output for a specific job?

I have a routine to save the logins and apply them on a different server , and I run this routine from a job that I have scheduled to run everyday.

On that job I have specified these 3 things:

  1. Log to table
  2. Append output to existing entry in table
  3. Include step output in history

as can be seen on the picture below:

enter image description here

I am happy with that, however, I was wondering if there is a way to trim the table output because when I open it I see records from over 4 months ago, which are no longer relevant now, as shown on the picture below:

when I click View:

enter image description here

I get:

enter image description here

and the table has over 61 thousand lines.

Every time the job runs it adds about 600 new lines to the bottom of the table.

Can I keep the last let’s say 10 thousand lines only,getting rid of the older lines?

Ipmitool output is not expected for the valid cahnnel

I am running ipmitool command for the valid channel 1 and 8 for my hardware and output as follows [admin@blr-sh115 /]# ipmitool lan print 1 Set in Progress : Set Complete Auth Type Support : Auth Type Enable : Callback : MD5 : User : MD5 : Operator : MD5 : Admin : MD5 : OEM : MD5 IP Address Source : Static Address IP Address : 10.73.148.162 Subnet Mask : 255.255.255.0 MAC Address : 00:11:22:33:44:55 SNMP Community String : AMI IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10 BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled Gratituous ARP Intrvl : 0.0 seconds Default Gateway IP : 0.0.0.0 Default Gateway MAC : 74:26:ac:b1:1c:c8 Backup Gateway IP : 0.0.0.0 Backup Gateway MAC : 00:00:00:00:00:00 802.1q VLAN ID : Disabled 802.1q VLAN Priority : 0 RMCP+ Cipher Suites : 0,1,2,3,6,7,8,11,12,15,16,17 Cipher Suite Priv Max : XaaaaaaaaaaaXXX : X=Cipher Suite Unused : c=CALLBACK : u=USER : o=OPERATOR : a=ADMIN : O=OEM [admin@blr-sh115 /]# ipmitool lan print 8 Cipher Suite Priv Max : Not Available

[admin@blr-sh115 /]# ipmitool lan print 2 Invalid channel: 2

2 is not a valid channel so output is expected. Why output is not coming for valid channel 8.

PHP: Can I pipe curl output through gunzip using built in curl functions?

I’m working on a script that downloads large files, decompresses them, and then parses the contents, inserting data I like into sql. I upgraded this script to work in a multi-threaded type way, where it is downloading one file, decompressing another file, and parsing another file all at once. But alas, I’m getting bottlenecked by the hard drive.

With the help of ##php, I realized I can use the following command to pipe output of curl directly to gunzip to cut my disk i/o in half (excluding SQL):

curl https://example.com/path/to/large_file.gz | gunzip -c > /large_temp_files/large_file

Tested and confirmed, this method writes the uncompressed data directly to disk without writing compressed data first.

So my question is, is there any way I can pipe the data like that using php’s build in curl functions? For regular files, you can open a file pointer and set that pointer as one of the curl_setopt options, to download the file to disk rather setting the data to a variable. These are 5 GB files so that’s not going to work. All my other code uses the built in functions for my http requests, so I’d like to stick with doing it that way if possible, for consistency and readability.